-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
47 lines (36 loc) · 946 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
44
45
FROM node:14.19-alpine3.15 as web
WORKDIR /webpack
COPY ./web .
#RUN yarn config set registry https://registry.npm.taobao.org
RUN yarn install
RUN yarn build
FROM golang:1.16-buster as service
WORKDIR /app
COPY . .
RUN make build
FROM ubuntu:20.04 as final
ENV DEBIAN_FRONTEND noninteractive
RUN apt update \
&& apt install -y python3 \
python3-pip \
mysql-client \
expect \
&& ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime \
&& echo 'Etc/UTC' /etc/timezone \
&& rm -rf /var /lib/apt/list/*
RUN pip3 install requests
WORKDIR /ticheck
COPY --from=web /webpack/dist ./web/dist
COPY --from=service /app/bin/ticheck-server ./service/bin/
COPY ./probes ./probes
COPY ./config ./config
COPY ./executor ./excutor
COPY ./logpath.sh .
COPY ./run.sh .
WORKDIR /ticheck/service/bin
# Create data dir
RUN mkdir ../../store
# Set gin mode
ENV GIN_MODE=release
EXPOSE 8081
ENTRYPOINT ["./ticheck-server"]