-
Notifications
You must be signed in to change notification settings - Fork 191
/
Dockerfile
29 lines (26 loc) · 882 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
FROM centos:7 AS builder-server
RUN yum install -y wget git make gcc \
&& wget https://studygolang.com/dl/golang/go1.16.6.linux-amd64.tar.gz \
&& tar -zxvf go1.16.6.linux-amd64.tar.gz -C /usr/local/
ENV GOROOT=/usr/local/go
ENV PATH=$PATH:$GOROOT/bin
RUN go env -w GO111MODULE=on \
&& go env -w GOPROXY=https://goproxy.cn,direct
WORKDIR /root/togettoyou/
COPY server/. .
RUN make
FROM node:16.17.1-alpine AS builder-web
WORKDIR /app
COPY web/package*.json ./
RUN yarn install
COPY web/. .
RUN yarn run build:prod
FROM togettoyou/zsign:latest AS zsign
FROM centos:7
WORKDIR /root/togettoyou/
COPY --from=builder-server /root/togettoyou/ipashare ./
COPY --from=builder-server /root/togettoyou/conf/ ./conf/
COPY --from=builder-web /app/dist/ ./dist/
COPY --from=zsign /zsign/zsign /bin/zsign
RUN yum install -y openssl openssl-devel unzip zip
ENTRYPOINT ["./ipashare"]