blob: 3c9da8995a58dc083a7ed71452bfd46dff5c9ed1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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"]
|