python - 尝试为 jenkins 和 ansible 构建更新的 Docker Image
问题描述
我正在尝试使用 jenkins 和 ansible 创建 docker 映像,但我收到 python3 警告说它已过时我已尝试添加 yum install python3 --upgrade ,但没有成功。
docker-compose.yaml
version: '3'
services:
jansible:
container_name: jansible
image: jansible
build:
context: jansible
ports:
- "9090:8080"
volumes:
- $PWD/jenkins_home:/var/jenkins_home
networks:
- net
networks:
net:
码头文件:
FROM jenkins/jenkins
USER root
RUN apt-get update && apt-get install python3-pip -y && \
pip3 install ansible --upgrade
USER jenkins
docker exec -it jansible bash
jenkins@6b79af149169:/$ ansible - playbook /usr/local/lib/python3.5/dist-packages/ansible/parsing/vault/init .py:44: CryptographyDeprecationWarning: Python 3.5 support will be dropped in the next release ofcryptography. 请升级您的 Python。
jenkins@6b79af149169:/$ python3 --version
Python 3.5.3
解决方案
推荐阅读
- c# - 当尝试`uint mask = ~0;`时,常量值'-1'不能转换为'uint'
- azure - 在服务结构中实现缓存支持
- angular - 如何修复:../core.es5.js 中的警告严重依赖项:依赖项的请求是一个表达式
- amazon-web-services - 无法使用 API Gateway 和 Lambda 进行 Canary 部署
- c++ - 节点 gyp 构建失败。在包含目录的子目录中找不到库头文件
- java - 在 JHIPSTER 中使用带有 Dialogflow 的意图检测时出错
- android - Flutter got No issues found 但创建项目后仍然无法获取包
- java - 如何在 Spring Boot 中修复我的双向一对多关系
- html - 在 Laravel localhost 上加载图像不起作用
- c# - EF Core 在多对多表中插入