diff options
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3c9da89 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM golang:1.15-alpine AS build + +WORKDIR /shoelaces +COPY . . + +RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-s -w -extldflags "-static"' -o /tmp/shoelaces . && \ +printf "---\nnetworkMaps:\n" > /tmp/mappings.yaml + +# Final container has basically nothing in it but the executable +FROM scratch +COPY --from=build /tmp/shoelaces /shoelaces + +WORKDIR /data +COPY --from=build /tmp/mappings.yaml mappings.yaml +COPY --from=build /shoelaces/web /web +ENV DOMAIN=0.0.0.0 +ENV PORT=8081 +ENTRYPOINT ["/shoelaces"] +CMD ["-data-dir", "/data", "-static-dir", "/web"] |