forked from flatcar/nebraska
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (17 loc) · 690 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM golang:1.16-alpine as nebraska-build
ENV GOPATH=/go \
GOPROXY=https://proxy.golang.org \
GO111MODULE=on
RUN apk update && \
apk add gcc git nodejs npm ca-certificates make musl-dev bash
COPY . /nebraska-source/
WORKDIR /nebraska-source
RUN make frontend backend-binary
FROM alpine:3.12.0
RUN apk update && \
apk add ca-certificates tzdata
COPY --from=nebraska-build /nebraska-source/backend/bin/nebraska /nebraska/
COPY --from=nebraska-build /nebraska-source/frontend/build/ /nebraska/static/
ENV NEBRASKA_DB_URL "postgres://postgres@postgres:5432/nebraska?sslmode=disable&connect_timeout=10"
EXPOSE 8000
CMD ["/nebraska/nebraska", "-http-static-dir=/nebraska/static"]