-
Notifications
You must be signed in to change notification settings - Fork 832
/
Dockerfile
30 lines (21 loc) · 859 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
# requiring Docker 17.05 or higher on the daemon and client
# see https://docs.docker.com/develop/develop-images/multistage-build/
# BUILD COMMAND :
# docker --build-arg RELEASE_VERSION=v1.0.0 -t infra/wayne:v1.0.0 .
# build server
FROM 360cloud/wayne-server-builder:v1.0.2 as backend
COPY go.mod /go/src/github.com/Qihoo360/wayne
COPY go.sum /go/src/github.com/Qihoo360/wayne
COPY src/backend /go/src/github.com/Qihoo360/wayne/src/backend
RUN export GO111MODULE=on && \
export GOPROXY=https://goproxy.io && \
cd /go/src/github.com/Qihoo360/wayne/src/backend && \
bee generate docs && \
bee pack -o /_build
# build release image
FROM 360cloud/centos:7
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
COPY --from=backend /_build/backend.tar.gz /opt/wayne/
WORKDIR /opt/wayne/
RUN tar -xzvf backend.tar.gz
CMD ["./backend"]