From da86df1ad62c36a23d58948b167d2b5db188f6e7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 21 Aug 2017 17:46:29 +0100 Subject: [PATCH] init: add /etc/ssl/certs as required by the metadata package The metadata package has binds - /dev - /var - /sys - /etc/resolv.conf - /etc/ssl/certs but unfortunately `/etc/ssl/certs` doesn't exist and this causes the following commands: cd blueprints/docker-for-mac # easy example moby build -name docker-for-mac base.yml docker-17.06-ce.yml linuxkit run hyperkit -networking=vpnkit -vsock-ports=2376 -disk size=500M docker-for-mac to produce the following error on the VM console: container_linux.go:265: starting container process caused "process_linux.go:348: container init caused \"rootfs_linux.go:57: mounting \\\"/etc/ssl/certs\\\" to rootfs \\\"/containers/onboot/000-metadata/rootfs\\\" at \\\"/etc/ssl/certs\\\" caused \\\"stat /etc/ssl/certs: no such file or directory\\\"\"" 2017/08/21 16:39:40 Error creating 000-metadata: exit status 1 This patch creates /etc/ssl/certs in the `init` package. The metadata package will now say things like 2017/08/21 16:44:39 No metadata/userdata found. Bye Signed-off-by: David Scott --- pkg/init/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/init/Dockerfile b/pkg/init/Dockerfile index 457616ee1..f1ddeca60 100644 --- a/pkg/init/Dockerfile +++ b/pkg/init/Dockerfile @@ -17,6 +17,9 @@ FROM linuxkit/alpine:a120ad6aead3fe583eaa20e9b75a05ac1b3487da AS mirror RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/ RUN apk add --no-cache --initdb -p /out alpine-baselayout busybox musl +# Add /etc/ssl/certs so it can be bind-mounted into metadata package +RUN mkdir -p /out/etc/ssl/certs + # Remove apk residuals. We have a read-only rootfs, so apk is of no use. RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache