Docker Hub official website 1. Search for Python mirror 2. Pull the Python image docker pull python 3. Check the image after downloading is complete docker images 4. Run the python image docker run -itd python:latest bash 5. Enter the container docker exec -it 6a55 bash # 6a55 is the container id obtained after docker ps checks the python image startup. You can get the complete container id 6. Check the Python version 7. This python image is the base images. All the crawler images I made later are based on this image. 8. The docker commands used are as follows: docker commit -m='scrapyd' -a='spider' 6a55 scrapyd/python3.8.3:v1 9. Since it is a base image, you need to install some common commands apt-get update apt-get install lrzsz -y# Please Baidu for the function of lrzsz apt-get install vim -y #Must install the artifact, hehe pip install -i https://pypi.douban.com/simple ipython apt-get install net-tools cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 13. Start production docker commit -m="base images" -a="spider" 6a55392dba72 python3.8.3:base-images If a long string of sha256 appears, it is successful. 15. Run the created image This is the end of this article about installing python3.8 image in docker. For more information about installing python3.8 image in docker, please search previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Implementation of a simple login page for WeChat applet (with source code)
>>: Use jQuery to fix the invalid page anchor point problem under iframe
Insert data into mysql database. Previously commo...
This article shares the specific code of Vue recu...
# contains a location information. The default anc...
question How to modify CSS pseudo-class style wit...
I came into contact with CSS a long time ago, but...
Preface: Vue3 has been released for a long time. ...
MySQL DECIMAL data type is used to store exact nu...
1. What is pip pip is a Python package management...
1. To prohibit all IP addresses from accessing th...
Table of contents Overview Problem Description Ci...
Table of contents Rendering API changes Render fu...
1. Create a centos7.6 system and optimize the sys...
Design Intentions When developing a page, you oft...
Pre-installation work: Make sure vmware workstati...
Download mysql-5.7.19-winx64 from the official we...