Skip to content

Commit d461959

Browse files
committed
Switched to nyu-devops-base image
1 parent 63c1c58 commit d461959

File tree

2 files changed

+5
-26
lines changed

2 files changed

+5
-26
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,14 @@
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
245
WORKDIR /app
256
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
289

2910
ENV PORT=8000
3011
EXPOSE $PORT
3112

3213
# Enable color terminal for docker exec bash
3314
ENV TERM=xterm-256color
34-
35-
# Become a regular user
36-
USER $USERNAME

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"psycopg",
1414
"pytest",
1515
"onupdate",
16-
"testdb"
16+
"testdb",
17+
"petstore"
1718
],
1819
"[python]": {
1920
"editor.defaultFormatter": "ms-python.black-formatter",

0 commit comments

Comments
 (0)