Well, not quite
docker build -t hello-world:latest -f Dockerfile .
STEP 1/9: FROM nginx:mainline-alpine
Resolving "nginx" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/library/nginx:mainline-alpine...
Getting image source signatures
Copying blob sha256:f2303c6c88653b9a6739d50f611c170b9d97d161c6432409c680f6b46a5f112f
Copying blob sha256:59bf1c3509f33515622619af21ed55bbe26d24913cedbca106468a5fb37a50c3
Copying blob sha256:8d6ba530f6489d12676d7f61628427d067243ba4a3a512c3e28813b977cb3b0e
Copying blob sha256:5288d7ad7a7f84bdd19c1e8f0abb8684b5338f3da86fe9ae1d7f0e9bc2de6595
Copying blob sha256:39e51c61c033442d00c40a30b2a9ed01f40205875fbd8664c50b4dc3e99ad5cf
Copying blob sha256:ee6f71c6f4a82b2afd01f92bdf6be0079364d03020e8a2c569062e1c06d3822b
Copying blob sha256:59bf1c3509f33515622619af21ed55bbe26d24913cedbca106468a5fb37a50c3
Copying blob sha256:f2303c6c88653b9a6739d50f611c170b9d97d161c6432409c680f6b46a5f112f
Copying blob sha256:5288d7ad7a7f84bdd19c1e8f0abb8684b5338f3da86fe9ae1d7f0e9bc2de6595
Copying blob sha256:39e51c61c033442d00c40a30b2a9ed01f40205875fbd8664c50b4dc3e99ad5cf
Copying blob sha256:8d6ba530f6489d12676d7f61628427d067243ba4a3a512c3e28813b977cb3b0e
Copying blob sha256:ee6f71c6f4a82b2afd01f92bdf6be0079364d03020e8a2c569062e1c06d3822b
Error: error creating build container: writing blob: storing blob to file "/var/tmp/storage979763649/1": write /var/tmp/storage979763649/1: no space left on device
GitHub to the rescue: -
Hitting "Error committing the finished image" "no space left on device" due to nonoptimized use of disk #3846
and easy to resolve - nuke the Podman machine (VM): -
podman machine rm
The following files will be deleted:
/Users/hayd/.ssh/podman-machine-default
/Users/hayd/.ssh/podman-machine-default.pub
/Users/hayd/.config/containers/podman/machine/qemu/podman-machine-default.ign
/Users/hayd/.local/share/containers/podman/machine/qemu/podman-machine-default_fedora-coreos-34.20210919.2.0-qemu.x86_64.qcow2
/Users/hayd/.config/containers/podman/machine/qemu/podman-machine-default.json
Are you sure you want to continue? [y/N] y
and create a new one: -
podman machine init
and start it: -
podman machine start
and now we're golden: -
docker build -t hello-world:latest -f Dockerfile .
STEP 1/9: FROM nginx:mainline-alpine
Resolving "nginx" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/library/nginx:mainline-alpine...
Getting image source signatures
Copying blob sha256:f2303c6c88653b9a6739d50f611c170b9d97d161c6432409c680f6b46a5f112f
Copying blob sha256:59bf1c3509f33515622619af21ed55bbe26d24913cedbca106468a5fb37a50c3
Copying blob sha256:8d6ba530f6489d12676d7f61628427d067243ba4a3a512c3e28813b977cb3b0e
Copying blob sha256:5288d7ad7a7f84bdd19c1e8f0abb8684b5338f3da86fe9ae1d7f0e9bc2de6595
Copying blob sha256:39e51c61c033442d00c40a30b2a9ed01f40205875fbd8664c50b4dc3e99ad5cf
Copying blob sha256:ee6f71c6f4a82b2afd01f92bdf6be0079364d03020e8a2c569062e1c06d3822b
Copying config sha256:bef258acf10dc257d641c47c3a600c92f87be4b4ce4a5e4752b3eade7533dcd9
Writing manifest to image destination
Storing signatures
STEP 2/9: RUN apk -U upgrade
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
(1/5) Upgrading busybox (1.34.1-r3 -> 1.34.1-r4)
Executing busybox-1.34.1-r4.post-upgrade
(2/5) Upgrading ca-certificates-bundle (20191127-r7 -> 20211220-r0)
(3/5) Upgrading libcrypto1.1 (1.1.1l-r7 -> 1.1.1l-r8)
(4/5) Upgrading libssl1.1 (1.1.1l-r7 -> 1.1.1l-r8)
(5/5) Upgrading ssl_client (1.34.1-r3 -> 1.34.1-r4)
Executing busybox-1.34.1-r4.trigger
Executing ca-certificates-20211220-r0.trigger
OK: 26 MiB in 42 packages
--> 068ffaec855
STEP 3/9: RUN apk --no-cache upgrade apk-tools
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
OK: 26 MiB in 42 packages
--> b5be6306f16
STEP 4/9: RUN apk update && apk upgrade && apk --no-cache add openssl
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
v3.15.0-282-g323523f173 [https://dl-cdn.alpinelinux.org/alpine/v3.15/main]
v3.15.0-283-g26a4fc70a6 [https://dl-cdn.alpinelinux.org/alpine/v3.15/community]
OK: 15857 distinct packages available
OK: 26 MiB in 42 packages
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
(1/1) Installing openssl (1.1.1l-r8)
Executing busybox-1.34.1-r4.trigger
OK: 26 MiB in 43 packages
--> ebf24d56671
STEP 5/9: RUN rm /etc/nginx/conf.d/*
--> 495424849fd
STEP 6/9: RUN openssl req -subj '/C=GB/O=IBM/CN=david_hay.uk.ibm.com' -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out /etc/nginx/nginx.crt -keyout /etc/nginx/nginx.key
Generating a RSA private key
......................................++++
.........++++
writing new private key to '/etc/nginx/nginx.key'
-----
--> 5ce7989df6c
STEP 7/9: ADD nginx.conf /etc/nginx/
--> facfc3c7d2d
STEP 8/9: ADD hello.html /usr/share/nginx/html/index.html
--> 65560b925f2
STEP 9/9: EXPOSE 443
COMMIT hello-world:latest
--> e8c50868858
Successfully tagged localhost/hello-world:latest
e8c508688581ab7c21289d270e821caaa34ed4a7e5e5a1242909ef826005b567