Skip to content

Instantly share code, notes, and snippets.

@jcjgraf
Created May 7, 2019 15:32
Show Gist options
  • Select an option

  • Save jcjgraf/c9f053fe970bae5122f1df4a034d0d7f to your computer and use it in GitHub Desktop.

Select an option

Save jcjgraf/c9f053fe970bae5122f1df4a034d0d7f to your computer and use it in GitHub Desktop.
Python 3 Dockerfile
FROM ubuntu:latest
RUN apt-get update \
&& apt-get install -y python3-pip python3-dev \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python \
&& pip3 install --upgrade pip
COPY ./requirements.txt /app/requirements.txt
WORKDIR /app
RUN python3 -m pip install -r requirements.txt
CMD ["python3", "-u", "/app/main.py"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment