-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (25 loc) · 1.01 KB
/
Dockerfile
File metadata and controls
37 lines (25 loc) · 1.01 KB
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
27
28
29
30
31
32
33
34
35
36
37
FROM golang:1.19.13 as builder
ENV GO111MODULE=on
COPY go.mod go.sum /go/src/github.com/jeff-blank/wg/
RUN sh -c "cd /go/src/github.com/jeff-blank/wg && go install github.com/gopherjs/gopherjs@v1.19.0-beta1"
RUN sh -c "cd /go/src/github.com/jeff-blank/wg && go install github.com/revel/cmd/revel@latest"
COPY app /go/src/github.com/jeff-blank/wg/app/
COPY conf /go/src/github.com/jeff-blank/wg/conf/
COPY jq /go/src/github.com/jeff-blank/wg/jq/
COPY public /go/src/github.com/jeff-blank/wg/public/
COPY Makefile /go/src/github.com/jeff-blank/wg/
WORKDIR src/github.com/jeff-blank/wg
ARG NR_LICENSE_B
ARG REVEL_SECRET_B
ARG DB_CONNECT_PROD_B
ENV NR_LICENSE=$NR_LICENSE_B REVEL_SECRET=$REVEL_SECRET_B DB_CONNECT_PROD=$DB_CONNECT_PROD_B
RUN sed -i 's/gmake/make/' Makefile
RUN CGO_ENABLED=0 GOOS=linux \
make release RELEASEDEST=/wg REINPLACE='sed -i'
FROM alpine:latest
COPY --from=builder /wg /wg
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY data /data/
ARG TZ_B
ENV TZ=$TZ_B
ENTRYPOINT ["/wg/run.sh"]