Skip to content

Instantly share code, notes, and snippets.

@ak9999
Created December 21, 2020 03:21
Show Gist options
  • Save ak9999/cec8def619d60657cdc982f0411d2ba9 to your computer and use it in GitHub Desktop.
Save ak9999/cec8def619d60657cdc982f0411d2ba9 to your computer and use it in GitHub Desktop.
Dockerfile for pair programming at NYC Python
# Live Share image built from official Python image
FROM python:slim
# Create a new user, dev
RUN useradd --create-home --shell /bin/bash dev
# Give dev a password
RUN echo 'dev:secret' | chpasswd
# Add dev to sudo group
RUN usermod -a -G sudo dev
# Update package list and install packages
RUN apt-get update
# Install apt-utils and sudo
RUN apt-get install -qy apt-utils sudo > /dev/null
# Install packages needed for VS Code Live Share
RUN apt-get install -qy libssl1.1 libkrb5-3 zlib1g libicu63 > /dev/null
# Run as user dev
USER dev
WORKDIR /home/dev
# Add ~/.local/bin to PATH
ENV PATH "$PATH:/home/dev/.local/bin/"
# Install some Python packages
RUN python -m pip install pytest pytest-watch flake8 --user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment