Docker packages the python command in detail
- 2020-05-30 21:20:53
Recently, I wrote a crawler in Python. In order to isolate its running environment and make it easy to distribute, I packaged the project into Docker images
FROM python:2.7.12-alpine ADD ./src /job CMD ["python", "/job/main.py"]
$ docker build -t job .
$ docker run -d --name job job