-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (25 loc) · 791 Bytes
/
Dockerfile
File metadata and controls
36 lines (25 loc) · 791 Bytes
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
FROM node:12-alpine as webbuilder
ADD . /proxy-pool
RUN cd /proxy-pool/web \
&& yarn \
&& yarn build \
&& rm -rf node_module
FROM golang:1.14-alpine as builder
COPY --from=webbuilder /proxy-pool /proxy-pool
RUN apk update \
&& apk add git make \
&& go get -u github.com/gobuffalo/packr/v2/packr2 \
&& cd /proxy-pool \
&& make build
FROM alpine
EXPOSE 4000
RUN addgroup -g 1000 go \
&& adduser -u 1000 -G go -s /bin/sh -D go \
&& apk add --no-cache ca-certificates
COPY --from=builder /proxy-pool/proxypool /usr/local/bin/proxypool
COPY --from=builder /proxy-pool/script/entrypoint.sh /entrypoint.sh
USER go
WORKDIR /home/go
HEALTHCHECK --timeout=10s CMD [ "wget", "http://127.0.0.1:4000/ping", "-q", "-O", "-"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["proxypool"]