2018-05-16 18:10:23 +00:00
|
|
|
# build stage
|
2020-07-27 20:17:06 +00:00
|
|
|
FROM golang:1.14-alpine AS build-env
|
2018-05-16 18:10:23 +00:00
|
|
|
RUN apk --no-cache add git
|
2020-07-27 20:17:06 +00:00
|
|
|
RUN CGO_ENABLED=0 go get -a -ldflags '-extldflags "-static"' p83.nl/go/ekster/...
|
2018-05-16 18:10:23 +00:00
|
|
|
|
|
|
|
# final stage
|
2020-07-27 20:17:06 +00:00
|
|
|
FROM alpine
|
2018-05-16 18:10:23 +00:00
|
|
|
RUN apk --no-cache add ca-certificates
|
2018-05-16 19:21:00 +00:00
|
|
|
RUN ["mkdir", "-p", "/opt/micropub"]
|
|
|
|
WORKDIR /opt/micropub
|
2018-05-16 18:10:23 +00:00
|
|
|
EXPOSE 80
|
|
|
|
COPY --from=build-env /go/bin/eksterd /app/
|
2018-07-09 19:59:26 +00:00
|
|
|
RUN ["mkdir", "/app/templates"]
|
2018-07-28 15:52:59 +00:00
|
|
|
COPY --from=build-env /go/src/p83.nl/go/ekster/templates /app/templates
|
2018-05-16 19:21:00 +00:00
|
|
|
ENTRYPOINT ["/app/eksterd"]
|