forked from TencentBlueKing/bk-iam-saas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (21 loc) · 1.06 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
FROM node:14.17.6 AS builder
COPY ./ /app
WORKDIR /app
RUN bash build.sh
FROM python:3.6.15-slim-buster
RUN rm /etc/apt/sources.list && \
echo "deb https://mirrors.cloud.tencent.com/debian buster main contrib non-free" >> /etc/apt/sources.list && \
echo "deb https://mirrors.cloud.tencent.com/debian buster-updates main contrib non-free" >> /etc/apt/sources.list && \
echo "deb-src https://mirrors.cloud.tencent.com/debian buster main contrib non-free" >> /etc/apt/sources.list && \
echo "deb-src https://mirrors.cloud.tencent.com/debian buster-updates main contrib non-free" >> /etc/apt/sources.list
RUN mkdir ~/.pip && printf '[global]\nindex-url = https://mirrors.cloud.tencent.com/pypi/simple/' > ~/.pip/pip.conf
RUN apt-get update && apt-get install -y gcc libssl-dev default-libmysqlclient-dev build-essential
ENV LC_ALL=C.UTF-8 \
LANG=C.UTF-8
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN pip3 install --upgrade pip
COPY --from=builder /app/src /app
WORKDIR /app
RUN pip install -r requirements.txt
CMD ["bash", "/app/bin/start.sh"]