Docker tag is munged
See original GitHub issueDescription:
I’m deploying an imaged based lambda function and specify the tag using the appropriate metadata in my template.yaml
:
DockerTag: v1
DockerContext: ./function
Dockerfile: Dockerfile
When this image is built using sam build
, the docker image created adheres to the following name:
% docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
process v1 4d8ff64bb5b8 20 hours ago 3.13GB
However, when sam deploy --guided
is invoked, the following image name is used:
% docker images
REPOSITORY TAG IMAGE ID CREATED
SIZE
8xxxxxxxxxx4.dkr.ecr.us-east-1.amazonaws.com/dev-scrb-process process-4d8ff64bb5b8-v1 4d8ff64bb5b8 20 hours ago 3.13GB
process v1 4d8ff64bb5b8 20 hours ago 3.13GB
Steps to reproduce:
Create a Docker image function to deploy with the metadata mentioned above.
Observed result:
See Description.
Expected result:
Shouldn’t the image push be: 8xxxxxxxxxx4.dkr.ecr.us-east-1.amazonaws.com/dev-scrb-process:v1
(which is what I was expecting? Why is the function name and another identifier prefix included in the image tag?
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: MacOS
SAM CLI, version 1.16.0
- AWS region: us-east-1
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
docker tag
docker tag : An image name is made up of slash-separated name components, optionally prefixed by a registry hostname. The hostname must comply...
Read more >Dockerfile Cheat Sheet - Kapeli
The builder returns an error if it cannot match the tag value. ... The exec form makes it possible to avoid shell string...
Read more >biocontainers/perl-data-munge - Quay.io
The selected Dockerfile contains a FROM that refers to private repository . A robot account with read access to that repository is required...
Read more >What's Wrong With The Docker :latest Tag? - vsupalov.com
Frequent issues and misconceptions around Docker's most used image tag.
Read more >Slurm github
The obsolete content for the original page can Learn how to build, configure and install ... --wrap "echo hello world". com:xtreme-d/docker-slurm-cluster.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@xirkus No worries. They are slightly related but one is for the SAM Spec vs the CLI.
In regards to your issue, this behavior is by design. When we upload to ECR, we add extra data to all different functions to be in the same ECR repo. We also add part of the sha (the “other identifier”) to the tag to allow redeployment on Lambda. Otherwise the image is the “same” and Lambda will not get updates.
Closing as this is by design.
@jfuss Are there plans to give more control over the tag creation to end users? e.g. if one deploys the same code to 5 different environments why to create 5 different images in ECR.