-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (21 loc) · 809 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (21 loc) · 809 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
FROM golang:1.15-alpine3.12 AS binarybuilder
ENV BUILD_PATH=/app/siproxy
RUN go env -w GO111MODULE=on && \
go env -w GOPROXY=https://goproxy.cn,direct && \
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \
mkdir -p ${BUILD_PATH} && \
apk add --update --no-cache make bash git
COPY . ${BUILD_PATH}
WORKDIR ${BUILD_PATH}
RUN make build
FROM alpine:3.12
ENV BUILD_PATH=/app/siproxy
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \
mkdir -p ${BUILD_PATH} && \
mkdir -p ${BUILD_PATH}/bin && \
apk add --update --no-cache tzdata && \
cp -r -f /usr/share/zoneinfo/PRC /etc/localtime && \
apk del tzdata
COPY --from=binarybuilder ${BUILD_PATH}/bin/ /usr/local/bin/
EXPOSE 5060
ENTRYPOINT ["siproxy"]