Skip to content

Commit

Permalink
Merge pull request #40 from uc-cdis/nextflow-update
Browse files Browse the repository at this point in the history
Update nextflow-upload-docker.md
  • Loading branch information
ciresiemanym authored May 3, 2024
2 parents d40237c + b9b044e commit 6076948
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions docs/nextflow-upload-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,9 @@ Next, use the AWS CLI to retrieve an authentication token and authenticate your

aws ecr get-login-password --region <region> | docker login --username AWS --password-stdin <repositoryUri>

## **Preparing to push your Docker image**
## **Preparing to push your Docker image: Tag your Docker image**

The specific steps you use to prepare to push your image depends on whether you have an image already built or if you will need to build from a Dockerfile.

### **If you already built a local Docker image: Tag your Docker image**

If you already have a locally-built Docker image, you will not need to run the `docker build` command included in the credentials. But, you do need to tag it with the ECR repository URI and the image tag you want to use. *This command is not in the credentials file.*
You should already have a [locally-built Docker image](nextflow-create-docker.md) before you get your credentials. But, you do need to tag it with the ECR repository URI and the image tag you want to use.

docker tag <local-image>:<local-tag> <repositoryUri>:<image-tag>

Expand All @@ -68,14 +64,6 @@ Replace `< repositoryUri >` with the ECR repository URI provided at the top of t
> If you do not want to overwrite, you can use versioned image-tags. For example: `batch-poc-1.0`, and then `batch-poc-1.1`.
> If you want to replace previous versions of your container, you can use the same image-tag.
### **If you need to build your Docker image:**

If you haven't already built your Docker image, you can use the `docker build` command that is included in your credentials, similar to what is shown below. Note that you should run this command from the directory holding your Dockerfile. You will need to replace the `< tag >` in your command with the image tag name you want to use in your ECR. (Read more about image tags in the previous section.)

docker build -t <repositoryUri>:<tag>

> If you use this `docker build` command from your credentials, you do not need to use the `docker tag` command (described in the previous section).
## **Push the Docker image to the ECR**

Push the tagged image to the ECR repository. The `docker push` command is also in the credentials - you just need to specify the image tag you selected when either tagging or building the image in the previous section.
Expand Down

0 comments on commit 6076948

Please sign in to comment.