-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
44 lines (28 loc) · 970 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
32
33
34
35
36
37
38
39
40
41
42
43
FROM node:14.17.6 AS build
WORKDIR /app
COPY package.json .
RUN npm install
COPY . .
RUN npm run build
FROM node:14.17.6-alpine AS release
LABEL maintainer="xkrfer <[email protected]>"
WORKDIR /release
COPY docker .
COPY package.json .
RUN npm install --production \
&& npm install -g pm2 \
&& apk update \
&& apk upgrade \
&& apk add --no-cache bash bash-doc bash-completion \
&& apk add --no-cache tzdata openrc libc6-compat\
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& sed -i 's/localhost/redis/g' /release/push/ios.yml \
&& sed -i 's/localhost/redis/g' /release/push/clip.yml \
&& wget https://github.com/appleboy/gorush/releases/download/v1.15.0/gorush-v1.15.0-linux-amd64 -O /release/push/gorush \
&& chmod +x /release/push/gorush \
&& chmod +x start.sh \
&& rm -rf /var/cache/apk/*
COPY --from=build /app/dist dist
COPY static static
EXPOSE 8800
ENTRYPOINT ["/bin/sh", "start.sh"]