commit dba3c057af7b28ba6d2177f371e7a99805f5508c
parent bad397ea4b7becfaf736c45a50c93f7f5659b570
Author: Vetle Haflan <vetle@haflan.dev>
Date: Mon, 20 Apr 2020 00:14:22 +0200
Don't try to use mkdir in 'FROM scratch' container
Now creates empty directory in build container instead. This should
make the CI succeed, but I think the build is still broken.
Debug needed!
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Dockerfile b/Dockerfile
@@ -17,9 +17,10 @@ RUN go get -d ./... ; \
-o /go/bin/sermoni \
-tags PRODUCUTION \
./cmd/sermoni/
-
+# Empty directory for database
+RUN mkdir -p /data
### Production image
FROM scratch
+COPY --from=builder /data /data
COPY --from=builder /go/bin/sermoni /sermoni
-RUN mkdir -p /data
ENTRYPOINT ["/sermoni", "-d", "/data/sermoni.db"]