-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (17 loc) · 728 Bytes
/
Copy pathDockerfile
File metadata and controls
23 lines (17 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM golang:latest as builder
# Fetch source from github
RUN go get github.com/tbinhluong/reverseproxy/...
WORKDIR /go/src/github.com/tbinhluong/reverseproxy/
RUN CGO_ENABLED=0 GOOS=linux make build
# Multi-stage build docker image
FROM alpine:latest
LABEL maintainer="Binh Luong <tbinhluong@gmail.com>"
RUN mkdir -p /reverseproxy && \
chown -R nobody:nogroup /reverseproxy
COPY --from=builder /go/src/github.com/tbinhluong/reverseproxy/dist/reverseproxy /bin/reverseproxy
COPY --from=builder /go/src/github.com/tbinhluong/reverseproxy/config/config.yml /reverseproxy/config.yml
USER nobody
EXPOSE 8080
WORKDIR /reverseproxy
ENTRYPOINT [ "/bin/reverseproxy" ]
CMD [ "--config.file=config.yml" ]