-
Notifications
You must be signed in to change notification settings - Fork 618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix AL2023 integration tests #4132
Conversation
@@ -52,6 +52,7 @@ fi | |||
# Remove the tag so this image can be deleted successfully in the docker image cleanup integ tests | |||
docker rmi amazon/image-cleanup-test-image1:make amazon/image-cleanup-test-image2:make amazon/image-cleanup-test-image3:make | |||
|
|||
docker pull public.ecr.aws/docker/library/busybox:1.34.1 | |||
mirror_local_image public.ecr.aws/docker/library/busybox:1.34.1 "127.0.0.1:51670/busybox:latest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that on older Docker versions docker tag <remote-image> <new-tag>
implicitly did a docker pull <remote-image>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like not
$ docker version
Client:
Version: 20.10.25
...
Server:
Engine:
Version: 20.10.25
...
$ docker tag public.ecr.aws/docker/library/busybox:1.34.1 my-busybox:latest
Error response from daemon: No such image: public.ecr.aws/docker/library/busybox:1.34.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So why does this script work on AL2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one thing I noticed is after we upgrade the docker version , it seem to be loading images from cache, which is different behavior than the old docker version
------now-----
docker build -f "linux0.dockerfile" -t amazon/image-cleanup-test-image1:make .
#0 building with "default" instance using docker driver
#1 [internal] load build definition from linux0.dockerfile
#1 DONE 0.0s
#1 [internal] load build definition from linux0.dockerfile
#1 transferring dockerfile: 799B done
#1 DONE 0.0s
#2 [internal] load metadata for public.ecr.aws/docker/library/busybox:1.34.1
#2 DONE 0.1s
#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s
#4 [1/2] FROM public.ecr.aws/docker/library/busybox:1.34.1@sha256:05a79c7279f71f86a2a0d05eb72fcb56ea36139150f0a75cd87e80a4272e4e39
#4 CACHED
#5 [2/2] RUN date > boo.txt
#5 DONE 0.3s
#6 exporting to image
#6 exporting layers 0.0s done
#6 writing image sha256:84ff0055b6122639be634db9dafab883496e1679c373aacd61fcf77a5a5dbff7 done
#6 naming to docker.io/amazon/image-cleanup-test-image1:make done
#6 DONE 0.0s
-----before----
docker build -f "linux0.dockerfile" -t amazon/image-cleanup-test-image1:make .
Sending build context to Docker daemon 25.09kB
Step 1/5 : FROM public.ecr.aws/docker/library/busybox:1.34.1
---> 827365c7baf1
Step 2/5 : MAINTAINER Amazon Web Services, Inc.
---> Using cache
---> 2b3c43b4ded9
Step 3/5 : RUN date > boo.txt
---> Running in 8ba679e67990
Removing intermediate container 8ba679e67990
---> 045ddd173e72
Step 4/5 : ENTRYPOINT ["sh","-c"]
---> Running in 6ba7cb44c6b2
Removing intermediate container 6ba7cb44c6b2
---> c4c998a1ebc0
Step 5/5 : CMD ["sleep 5"]
---> Running in 1926dc4f2f38
Removing intermediate container 1926dc4f2f38
---> bfe53246779e
Successfully built bfe53246779e
Successfully tagged amazon/image-cleanup-test-image1:make
@@ -52,6 +52,7 @@ fi | |||
# Remove the tag so this image can be deleted successfully in the docker image cleanup integ tests | |||
docker rmi amazon/image-cleanup-test-image1:make amazon/image-cleanup-test-image2:make amazon/image-cleanup-test-image3:make | |||
|
|||
docker pull public.ecr.aws/docker/library/busybox:1.34.1 | |||
mirror_local_image public.ecr.aws/docker/library/busybox:1.34.1 "127.0.0.1:51670/busybox:latest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like not
$ docker version
Client:
Version: 20.10.25
...
Server:
Engine:
Version: 20.10.25
...
$ docker tag public.ecr.aws/docker/library/busybox:1.34.1 my-busybox:latest
Error response from daemon: No such image: public.ecr.aws/docker/library/busybox:1.34.1
@@ -52,6 +52,7 @@ fi | |||
# Remove the tag so this image can be deleted successfully in the docker image cleanup integ tests | |||
docker rmi amazon/image-cleanup-test-image1:make amazon/image-cleanup-test-image2:make amazon/image-cleanup-test-image3:make | |||
|
|||
docker pull public.ecr.aws/docker/library/busybox:1.34.1 | |||
mirror_local_image public.ecr.aws/docker/library/busybox:1.34.1 "127.0.0.1:51670/busybox:latest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So why does this script work on AL2?
Summary
This PR fix failed AL2023 integration tests.
Implementation details
Error response from daemon: No such image: public.ecr.aws/docker/library/busybox:1.34.1
Error response from daemon: client version 1.21 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version
Testing
New tests cover the changes:
Description for the changelog
Fix AL2023 integration tests
Does this PR include breaking model changes? If so, Have you added transformation functions?
noLicensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.