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 1
1
# 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
22
3
23
4
# Set up the Python development environment
24
5
WORKDIR /app
25
6
COPY 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
28
9
29
10
ENV PORT=8000
30
11
EXPOSE $PORT
31
12
32
13
# Enable color terminal for docker exec bash
33
14
ENV TERM=xterm-256color
34
-
35
- # Become a regular user
36
- USER $USERNAME
Original file line number Diff line number Diff line change 13
13
" psycopg" ,
14
14
" pytest" ,
15
15
" onupdate" ,
16
- " testdb"
16
+ " testdb" ,
17
+ " petstore"
17
18
],
18
19
"[python]" : {
19
20
"editor.defaultFormatter" : " ms-python.black-formatter" ,
You can’t perform that action at this time.
0 commit comments