ejschwartz commited on
Commit
f9c9a48
·
1 Parent(s): fe9682c
Files changed (1) hide show
  1. Dockerfile +4 -8
Dockerfile CHANGED
@@ -1,6 +1,8 @@
1
  # Build on top of the psychec type inference Docker image
2
  FROM ghcr.io/edmcman/psychec-typeinference-docker:original
3
 
 
 
4
  # Install Python and pip
5
  RUN apt-get update && apt-get install -y \
6
  python3 \
@@ -8,6 +10,8 @@ RUN apt-get update && apt-get install -y \
8
  python3-venv \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
 
11
  # Create a virtual environment and install dependencies
12
  RUN python3 -m venv /opt/venv
13
  ENV PATH="/opt/venv/bin:$PATH"
@@ -15,14 +19,6 @@ ENV PATH="/opt/venv/bin:$PATH"
15
  COPY ./requirements.txt /code/requirements.txt
16
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
17
 
18
- # Set up a new user named "user" with user ID 1000
19
- #RUN useradd -o -m -u 1000 user
20
-
21
- RUN chown -R vscode:vscode /workspace/psychec
22
-
23
- # Switch to the "user" user
24
- USER vscode
25
-
26
  # Set home to the user's home directory
27
  ENV HOME=/home/vscode \
28
  PATH=/home/vscode/.local/bin:/opt/venv/bin:$PATH
 
1
  # Build on top of the psychec type inference Docker image
2
  FROM ghcr.io/edmcman/psychec-typeinference-docker:original
3
 
4
+ USER root
5
+
6
  # Install Python and pip
7
  RUN apt-get update && apt-get install -y \
8
  python3 \
 
10
  python3-venv \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ USER vscode
14
+
15
  # Create a virtual environment and install dependencies
16
  RUN python3 -m venv /opt/venv
17
  ENV PATH="/opt/venv/bin:$PATH"
 
19
  COPY ./requirements.txt /code/requirements.txt
20
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
21
 
 
 
 
 
 
 
 
 
22
  # Set home to the user's home directory
23
  ENV HOME=/home/vscode \
24
  PATH=/home/vscode/.local/bin:/opt/venv/bin:$PATH