-
Notifications
You must be signed in to change notification settings - Fork 163
/
Dockerfile
33 lines (26 loc) · 929 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
FROM rockylinux:9.1
MAINTAINER "shenshuo<191715030@qq.com>"
# 设置编码
#ENV LANG en_US.UTF-8
ENV LANG C.UTF-8
# 同步时间
ENV TZ=Asia/Shanghai
RUN yum install -y python3 python3-pip git && \
yum clean all
# 3. 安装pip依赖
#RUN pip install --upgrade pip
RUN python3 -m pip install --upgrade pip
RUN pip install -U git+https://github.com/ss1917/codo_sdk.git
#### 以上python3.9通用
ARG SERVICE_NAME
ENV SERVICE_NAME=${SERVICE_NAME}
WORKDIR /data
COPY . .
RUN pip install -r requirements.txt &> /dev/null && \
chmod -R a+x /data/run-py.sh
EXPOSE 8000
CMD /data/run-py.sh ${SERVICE_NAME}
## docker build --no-cache --build-arg SERVICE_NAME=cmdb . -t ops_cmdb_image
## docker build --build-arg SERVICE_NAME=cmdb . -t ops_cmdb_image
## docker build --build-arg SERVICE_NAME=cmdb . -t ops-huanle.tencentcloudcr.com/codo/codo_cmdb_image
## docker push ops-huanle.tencentcloudcr.com/codo/codo_cmdb_image