Skip to content

Commit

Permalink
Merge pull request #7 from alliance-genome/AGR-2528
Browse files Browse the repository at this point in the history
AGR-2528 base-linux dockerhub => ECR code-changes
  • Loading branch information
oblodgett authored Nov 24, 2020
2 parents 34f628d + c4e715c commit 693b76f
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
REG := 100225593120.dkr.ecr.us-east-1.amazonaws.com

build:
docker build --no-cache -t agrdocker/agr_base_linux_env .
docker build --no-cache -t ${REG}/agr_base_linux_env .

registry-docker-login:
ifneq ($(shell echo ${REG} | egrep "ecr\..+\.amazonaws\.com"),)
@$(eval DOCKER_LOGIN_CMD=aws)
ifneq (${AWS_PROFILE},)
@$(eval DOCKER_LOGIN_CMD=${DOCKER_LOGIN_CMD} --profile ${AWS_PROFILE})
endif
@$(eval DOCKER_LOGIN_CMD=${DOCKER_LOGIN_CMD} ecr get-login-password | docker login -u AWS --password-stdin https://${REG})
${DOCKER_LOGIN_CMD}
endif

push: build
docker push agrdocker/agr_base_linux_env
push: registry-docker-login build
docker push ${REG}/agr_base_linux_env

bash:
docker run -t -i agrdocker/agr_base_linux_env bash
docker run -t -i ${REG}/agr_base_linux_env bash

0 comments on commit 693b76f

Please sign in to comment.