-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from alliance-genome/AGR-2528
AGR-2528 base-linux dockerhub => ECR code-changes
- Loading branch information
Showing
1 changed file
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |