You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I pull/push gcr.io/agones-images/agones-sdk:0.7.0 and gcr.io/agones-images/agones-controller:0.7.0 to private registry, I notice strange layers sizes. After digging in docker history --no-trunc i discover:
$ docker history gcr.io/agones-images/agones-sdk:0.7.0 --no-trunc
SIZE CREATED BY
...
36.3MB /bin/sh -c chown -R agones /home/agones && chmod o+x /home/agones/sdk-server
36.3MB /bin/sh -c #(nop) COPY file:8722bd89cce1b48c82a0c1fd092dc023d376a017c441e11339f5febcb59db882 in /home/agones/sdk-server
...
$ docker history gcr.io/agones-images/agones-controller:0.7.0 --no-trunc
SIZE CREATED BY
...
38.1MB /bin/sh -c chown -R agones /home/agones && chmod o+x /home/agones/controller
38.1MB /bin/sh -c #(nop) COPY file:d96d94ca03fbe2e312ab882c2cf14cee205dad4720f27dc5c1a567cdc6307899 in /home/agones/controller
...
Actually we can reduce the size of containers twice (same applies to agones-controller image 44.5 vs 82.8 MB):
docker image ls | grep ping
gcr.io/agones-alexander/agones-ping 0.8.0-86b1326 c0044f50ca15 22 minutes ago 18.9MB
gcr.io/agones-images/agones-ping 0.8.0-86b1326 b66ae871dcec About an hour ago 31.6MB
I have performed a test with COPY --chmod parameter in Dockerfile and without:
The resulting permissions are the same so it seems that chmod o+x is redundant.
With following lines in Ping Dockerfile:
COPY --chown=agones:root ./bin/ping /home/agones/ping
USER agones
RUN ls -al /home/agones
I got such output:
Step 5/6 : RUN ls -al /home/agones
---> Running in 37df117b94c0
total 12404
drwxr-sr-x 1 agones agones 4096 Jan 9 13:06 .
drwxr-xr-x 1 root root 4096 Dec 4 08:46 ..
-rwxr-xr-x 1 agones root 12692425 Jan 9 13:06 ping
I got same permissions to a file and directory as when I run current version of Docker image:
docker run --name ping -d gcr.io/agones-images/agones-ping:0.8.0-86b1326
docker exec -it ping /bin/sh
/ $ ls -al /home/agones
total 12408
drwxr-sr-x 1 agones agones 4096 Jan 9 12:52 .
drwxr-xr-x 1 root root 4096 Dec 4 08:46 ..
-rwxr-xr-x 1 agones root 12692425 Jan 9 12:39 ping
Not sure would the resulting Dockerfile be cross-platform or not.
When I pull/push gcr.io/agones-images/agones-sdk:0.7.0 and gcr.io/agones-images/agones-controller:0.7.0 to private registry, I notice strange layers sizes. After digging in docker history --no-trunc i discover:
All binary layers doubled :(
Maybe use COPY --chown=user:group src... dest and fix execution flag via Makefile?
Same thing with gcr.io/agones-images/agones-ping:0.7.0
The text was updated successfully, but these errors were encountered: