Skip to content

Instantly share code, notes, and snippets.

@ak9999
Created December 21, 2020 03:21
Show Gist options
  • Select an option

  • Save ak9999/cec8def619d60657cdc982f0411d2ba9 to your computer and use it in GitHub Desktop.

Select an option

Save ak9999/cec8def619d60657cdc982f0411d2ba9 to your computer and use it in GitHub Desktop.

Revisions

  1. ak9999 created this gist Dec 21, 2020.
    21 changes: 21 additions & 0 deletions NYCPythonVSCodeLiveShare.Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    # 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