Not able to buid with latest tag in dockerfile

70 views Asked by At

I m trying to build an image with two tags - latest and version number.

Current implementation-

docker build \
    -t ${IMAGE_NAME}:latest \
    -t ${IMAGE_NAME}:${VERSION} \
docker push "$IMAGE_NAME:latest"
docker push "$IMAGE_NAME:$VERSION"

Current output- The push refers to repository [docker.artifactory.in.com/ci-imageatest]

[+] Building 0.1s (17/17) FINISHED                                                                                                                                                                                 
 => [internal] load build definition from Dockerfile                                                                                                                                                          
 => exporting to image                                                                                                                                                                                        0.0s
 => => exporting layers                                                                                                                                                                                       0.0s
 => => writing image sha256:cf                                                                                                               0.0s
 => => naming to docker.artifactory.in.com/pysdk-ci-imageatest                                                                                                                                     0.0s
 => => naming to docker.artifactory.in.com/pysdk-ci-image:20220

Instead of creating a latest tag its creating repo ci-imageatest.

Can someone help what am I missing.

1

There are 1 answers

1
Isha Nema On

This did the trick:

docker push ${IMAGE_NAME}:latest