-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
31 lines (21 loc) · 682 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
27
28
29
30
31
FROM mhart/alpine-node:10 as base
RUN apk add --no-cache alpine-sdk python
FROM base as build
WORKDIR /bproxy
COPY ./include /bproxy/include
COPY ./src /bproxy/src
COPY Makefile /bproxy/Makefile
COPY package.json /bproxy/package.json
COPY bproxy.gyp /bproxy/bproxy.gyp
COPY options.gypi /bproxy/options.gypi
COPY common.gypi /bproxy/common.gypi
COPY binding.gyp /bproxy/binding.gyp
COPY bproxy.json /bproxy/bproxy.json
COPY 3rdparty /bproxy/3rdparty
RUN npm install --prod && npm run build
FROM alpine:3.7
WORKDIR /bproxy
COPY --from=build /bproxy/bproxy.json /bproxy/bproxy.json
COPY --from=build /bproxy/out/Release/bproxy /usr/bin/bproxy
EXPOSE 80 443
CMD [ "bproxy" ]