go to github.com/treehouses/rpi-nginx dir
modifid Dockerfile
run docker build
root@vmnet8cloud:~/git_repo/treehouses/rpi-nginx# docker build -t vmnet8/preplanet:rpi-1.1 .
root@vmnet8cloud:/git_repo/treehouses/rpi-nginx# docker images/git_repo/treehouses/rpi-nginx# docker run -d treehouses/rpi-nginx:1.0
REPOSITORY TAG IMAGE ID CREATED SIZE
treehouses/rpi-nginx 1.0 1bd2ae323561 3 minutes ago 50.7MB
root@vmnet8cloud:
22992681fb717fcf19cd9691dbaf7089b2280e0667881e8d0ce18b9a1a82da70
root@vmnet8cloud:~/git_repo/treehouses/rpi-nginx# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
22992681fb71 treehouses/rpi-nginx:1.0 “/usr/bin/entry.sh n…” 9 seconds ago Up 8 seconds 80/tcp, 443/tcp mystifying_rhodes
root@vmnet8cloud:~/git_repo/treehouses/rpi-nginx# docker push treehouses/rpi-nginx:1.0
The push refers to repository [docker.io/treehouses/rpi-nginx]
7023a6605ba3: Pushed
64ac289193c5: Pushed
4b51db9fecf2: Mounted from vmnet8/preplanet
4206eb6099cb: Mounted from vmnet8/preplanet
3d13333fb74a: Mounted from vmnet8/preplanet
6eca2d86fb5c: Mounted from vmnet8/preplanet
9863749692b7: Mounted from vmnet8/preplanet
77ffeb9e9842: Mounted from vmnet8/rpi-nginx
1.0: digest: sha256:acb7fc62ea8ba61ad58c17f774c35c8c3284a51dda29c575935c732655271c60 size: 1995
going to create a multi-arch docker hub
root@vmnet8cloud:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
treehouses/rpi-nginx 1.0 1bd2ae323561 2 hours ago 50.7MB
nginx 1.14.0-alpine 68513e2e4bce 16 months ago 14.4MB
I need use nginx:1.16.0-alpine to create multi-arch dockerhub image, so
root@vmnet8cloud:~# docker pull nginx:1.16.0-alpine
run
root@vmnet8cloud:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
treehouses/rpi-nginx 1.0 1bd2ae323561 2 hours ago 50.7MB
nginx 1.16.0-alpine 05edf438c0e4 8 months ago 17.6MB
nginx 1.14.0-alpine 68513e2e4bce 16 months ago 14.4MB
In order to create docker manifest list, I need to modify the docker image’s tag
root@vmnet8cloud:# docker tag treehouses/rpi-nginx:1.0 treehouses/nginx:rpi# docker tag nginx:1.16.0-alpine treehouses/nginx:x86
root@vmnet8cloud:
After change the tags, it shows new image name
root@vmnet8cloud:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
treehouses/nginx rpi 1bd2ae323561 2 hours ago 50.7MB
treehouses/rpi-nginx 1.0 1bd2ae323561 2 hours ago 50.7MB
nginx 1.16.0-alpine 05edf438c0e4 8 months ago 17.6MB
treehouses/nginx x86 05edf438c0e4 8 months ago 17.6MB
nginx 1.14.0-alpine 68513e2e4bce 16 months ago 14.4MB
I need to push these two new images (name) to dockerhub
root@vmnet8cloud:/git_repo/treehouses/rpi-nginx# docker push treehouses/nginx:rpi/git_repo/treehouses/rpi-nginx# docker push treehouses/nginx:x86
root@vmnet8cloud:
create a multi-arch docker image
root@vmnet8cloud:~/git_repo/treehouses/rpi-nginx# docker manifest create treehouses/nginx:latest treehouses/nginx:x86 treehouses/nginx:rpi
Last steps to push this multi-arch to docker hub
root@vmnet8cloud:~/git_repo/treehouses/rpi-nginx# docker manifest push treehouses/nginx