网页设计网站建设的书籍,做电影网站要不要收费的,购物网站php源代码,网络培训远程教育平台条件#xff1a;
gitlab准备好 jenkins准备好 (不会java项目, 故跳过Maven打jar包)
jenkins配置 在配置里通过插件Git Parameter配置Git#xff0c;以便于从gitlab 拉去代码到Jenkins r容器内 /var/jenkins_home/ 刚接触python 项目好像不需要构建#xff0c;直接推送到远…
条件
gitlab准备好 jenkins准备好 (不会java项目, 故跳过Maven打jar包)
jenkins配置 在配置里通过插件Git Parameter配置Git以便于从gitlab 拉去代码到Jenkins r容器内 /var/jenkins_home/ 刚接触python 项目好像不需要构建直接推送到远程服务器**/usr/local/test/**目录下容器化启动
# 绝对地址(路径)
cd /usr/local/test/
docker compose -f docker-compose.yml down
docker rmi mytest:v1.0.0
docker compose -f docker-compose.yml up -dgitlab-python项目
项目展示 Dockerfile文件
FROM martinkaburu/python3.7-alpineWORKDIR /workspaceCOPY . ./RUN pip3 install --index https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip \pip3 install --index https://pypi.tuna.tsinghua.edu.cn/simple -r /workspace/requirements.txt --no-cache-dir \chmod ax /workspace/main.pyEXPOSE 8081CMD [python3, main.py]docker-compose.yml
version: 3.1
services:mytest:build:context: ./dockerfile: Dockerfileimage: mytest:v1.0.0container_name: mytestports:- 8081:8081展示