File tree Expand file tree Collapse file tree 2 files changed +5
-26
lines changed Expand file tree Collapse file tree 2 files changed +5
-26
lines changed Original file line number Diff line number Diff line change 11# Image for a Python 3 development environment
2- FROM python:3.11-slim
3-
4- # Add any tools that are needed beyond Python 3.11
5- RUN apt-get update && \
6- apt-get install -y sudo vim make git zip tree curl wget jq procps net-tools && \
7- apt-get autoremove -y && \
8- apt-get clean -y
9-
10- # Create a user for development
11- ARG USERNAME=vscode
12- ARG USER_UID=1000
13- ARG USER_GID=$USER_UID
14-
15- # Create the user with passwordless sudo privileges
16- RUN groupadd --gid $USER_GID $USERNAME \
17- && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME -s /bin/bash \
18- && usermod -aG sudo $USERNAME \
19- && echo $USERNAME ALL=\( root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
20- && chmod 0440 /etc/sudoers.d/$USERNAME \
21- && chown -R $USERNAME:$USERNAME /home/$USERNAME
2+ FROM quay.io/rofrano/nyu-devops-base:su25
223
234# Set up the Python development environment
245WORKDIR /app
256COPY Pipfile Pipfile.lock ./
26- RUN python -m pip install -U pip pipenv && \
27- pipenv install --system --dev
7+ RUN sudo python -m pip install -U pip pipenv && \
8+ sudo pipenv install --system --dev
289
2910ENV PORT=8000
3011EXPOSE $PORT
3112
3213# Enable color terminal for docker exec bash
3314ENV TERM=xterm-256color
34-
35- # Become a regular user
36- USER $USERNAME
Original file line number Diff line number Diff line change 1313 " psycopg" ,
1414 " pytest" ,
1515 " onupdate" ,
16- " testdb"
16+ " testdb" ,
17+ " petstore"
1718 ],
1819 "[python]" : {
1920 "editor.defaultFormatter" : " ms-python.black-formatter" ,
You can’t perform that action at this time.
0 commit comments