Skip to content

Commit

Permalink
Add support for Amazon ECR
Browse files Browse the repository at this point in the history
  • Loading branch information
hisplan committed Jul 13, 2021
1 parent b152700 commit c7864e8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
4 changes: 3 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

docker build -t cellranger-arc:1.0.0 .
source config.sh

docker build -t ${image_name}:${version} .
9 changes: 9 additions & 0 deletions config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version="1.0.1"

# docker related
registry="583643567512.dkr.ecr.us-east-1.amazonaws.com"
image_name="cellranger-arc"

# set this to 1 if you want to create a repository in AWS ECR
# set this to 0 for Docker Hub
create_ecr_repo=1
17 changes: 17 additions & 0 deletions package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

source config.sh

echo "${registry}/${image_name}:${version}"

docker tag ${image_name}:${version} ${registry}/${image_name}:${version}
if [ $create_ecr_repo == 1 ]
then
# only create if not exist
aws ecr describe-repositories --repository-name ${image_name} 2> /dev/null
if [ $? != 0 ]
then
aws ecr create-repository --repository-name ${image_name}
fi
fi
docker push ${registry}/${image_name}:${version}
5 changes: 0 additions & 5 deletions push.sh

This file was deleted.

0 comments on commit c7864e8

Please sign in to comment.