Skip to content

Commit ea00a7d

Browse files
yangmvyangmv
authored andcommitted
edit Dockerfile
1 parent ba4bbe6 commit ea00a7d

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,23 @@ RUN wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz
1414
RUN xz -d Python-3.6.6.tar.xz && tar xvf Python-3.6.6.tar && cd Python-3.6.6 && ./configure && make && make install
1515

1616
# 3. 复制代码
17-
RUN mkdir -p /var/www/
17+
#RUN mkdir -p /var/www/
1818
ADD . /var/www/CMDB/
19+
WORKDIR /var/www/CMDB/
1920

2021
# 4. 安装pip依赖
2122
RUN pip3 install --user --upgrade pip
22-
RUN pip3 install -r /var/www/CMDB/requirements.txt
23+
RUN pip3 install -r requirements.txt
2324

24-
# 5.准备配置文件
25-
RUN cp /var/www/CMDB/cmdb-example.conf /var/www/CMDB/cmdb.conf
26-
27-
# 6. 数据初始化
25+
# 5. 数据初始化
2826
# RUN python3 /var/www/CMDB/manage.py makemigrations
2927
# RUN python3 /var/www/CMDB/manage.py migrate
3028

31-
# 7. 日志
29+
# 6. 日志
3230
VOLUME /var/log/
3331

34-
# 8. 准备文件
32+
# 7. 准备文件
33+
COPY cmdb-example.conf cmdb.conf
3534
COPY docs/supervisor_cmdb.conf /etc/supervisord.conf
3635
COPY docs/nginx_cmdb.conf /etc/nginx/conf.d/
3736

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
node('haimaxy-jnlp') {
22
stage('Clone') {
33
echo "1.Clone 代码"
4-
git url: "$(git_url)"
4+
git url: "${git_url}"
55
script {
66
build_tag = sh(returnStdout: true, script: 'git rev-parse --short HEAD').trim()
77
}

0 commit comments

Comments
 (0)