formless/Dockerfile

28 lines
466 B
Docker
Raw Normal View History

2020-09-20 23:11:00 +00:00
## build image:
2020-09-20 22:45:35 +00:00
FROM golang:1.15 as builder
2020-09-20 23:11:00 +00:00
RUN mkdir -p /go/src/git.eeqj.de/sneak/formless
WORKDIR /go/src/git.eeqj.de/sneak/formless
COPY go.mod .
COPY go.sum .
RUN go mod download
2020-09-20 22:45:35 +00:00
2020-09-20 23:11:00 +00:00
ADD . /go/src/git.eeqj.de/sneak/formless/
RUN make build
2020-09-20 22:45:35 +00:00
2020-09-20 23:11:00 +00:00
## output image:
2020-09-20 22:45:35 +00:00
FROM scratch
2020-09-20 23:11:00 +00:00
COPY --from=builder /go/src/git.eeqj.de/sneak/formless/formless /app/formless
COPY --from=builder /go /go.archive
2020-09-20 22:45:35 +00:00
WORKDIR /app
ENV PORT 8080
ENV DBURL none
EXPOSE 8080
CMD ["./formless"]