Skip to content

Instantly share code, notes, and snippets.

@pamelafox
Created June 16, 2023 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pamelafox/a2445c7e15fae9f8df40ba26142399b4 to your computer and use it in GitHub Desktop.
Save pamelafox/a2445c7e15fae9f8df40ba26142399b4 to your computer and use it in GitHub Desktop.
Dockerfile for single Python version
FROM python:3.11.2-slim
# Install Git
RUN apt-get update && apt-get install -q -y --fix-missing \
git && \
rm -rf /var/lib/apt/lists/*
#[Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
COPY .devcontainer/requirements.txt /tmp/pip-tmp/
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
&& rm -rf /tmp/pip-tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment