blob: b2c4904690fdc77e7c36f507a65ce0964f1f4ca2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
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 BIND_ADDR=0.0.0.0:8081
EXPOSE 8081
ENTRYPOINT ["/shoelaces"]
CMD ["-data-dir", "/data", "-static-dir", "/web"]
|