How does docker python implement the packaging method

  • 2020-05-30 21:20:43
  • OfStack

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/"]

Build commands

$ docker build -t job .


$ docker run -d --name job job

Relatively simple

Thank you for reading, I hope to help you, thank you for your support of this site!

Related articles: