Skip to content

Instantly share code, notes, and snippets.

@thicolares
Last active June 12, 2018 23:06
Show Gist options
  • Save thicolares/311f18c7a67fa6fdfc303931f1a5d12f to your computer and use it in GitHub Desktop.
Save thicolares/311f18c7a67fa6fdfc303931f1a5d12f to your computer and use it in GitHub Desktop.
Build a docker image to run python script
FROM python:3
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
ADD . /code/
@thicolares
Copy link
Author

thicolares commented Jun 12, 2018

  1. Crie uma pasta e coloque seu script python
$ cd minha-pasta

Coloque aqui o arquivo Dockerfile

$ docker build -t meunome/nomequalquer .
$ docker container run -it meunome/nomequalquer:latest python meuscript.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment