forked from GreaterWMS/GreaterWMS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (40 loc) · 1.64 KB
/
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
FROM --platform=linux/amd64 python:3.8.10-slim AS backend
RUN mkdir -p /GreaterWMS/templates
#copy requirements.txt
ADD ./requirements.txt /GreaterWMS/requirements.txt
COPY ./backend_start.sh /GreaterWMS/backend_start.sh
#Configure working directory
WORKDIR /GreaterWMS
ENV port = ${port}
#Installation foundation dependency
#RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
#RUN apt-get clean
RUN apt-get update --fix-missing && apt-get upgrade -y
RUN apt-get install build-essential -y
RUN apt-get install supervisor -y
#Configure pip3 Alibaba Source
#RUN pip3 config set global.index-url http://mirrors.aliyun.com/pypi/simple/
#RUN pip3 config set install.trusted-host mirrors.aliyun.com
RUN python3 -m pip install --upgrade pip
#Install supervisor daphne
RUN pip3 install supervisor
RUN pip3 install -U 'Twisted[tls,http2]'
RUN pip3 install -r requirements.txt
RUN pip3 install daphne
RUN chmod +x /GreaterWMS/backend_start.sh
CMD ["/GreaterWMS/backend_start.sh"]
FROM --platform=linux/amd64 node:14.19.3-buster-slim AS front
COPY ./templates/package.json /GreaterWMS/templates/package.json
#COPY ./templates/node_modules/ /GreaterWMS/templates/node_modules/
COPY ./web_start.sh /GreaterWMS/templates/web_start.sh
ENV port = ${port}
#ENV NODE_OPTIONS=--openssl-legacy-provider
RUN cd /GreaterWMS/templates
RUN npm install -g npm --force
#RUN npm config set registry https://registry.npm.taobao.org
RUN npm install -g yarn --force
#RUN yarn config set registry https://registry.npm.taobao.org
RUN npm install -g @quasar/cli --force
RUN yarn install
RUN chmod +x /GreaterWMS/templates/web_start.sh
ENTRYPOINT ["/GreaterWMS/templates/web_start.sh"]