Skip to content

Commit 96cb86e

Browse files
committed
fix: remove docker user for code runner
1 parent 04ad844 commit 96cb86e

3 files changed

Lines changed: 1 addition & 24 deletions

File tree

docker/cpp/Dockerfile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ FROM gcc:11.2.0
22

33
WORKDIR /code
44

5-
# Install Google Test and JsonCpp with proper include paths
65
RUN apt-get update && apt-get install -y \
76
cmake \
87
libgtest-dev \
@@ -12,9 +11,3 @@ RUN apt-get update && apt-get install -y \
1211
&& make \
1312
&& cp lib/*.a /usr/lib \
1413
&& ln -s /usr/include/jsoncpp/json /usr/include/json
15-
16-
# Set security limits
17-
RUN useradd -m player
18-
RUN chown -R player:player /code
19-
RUN chmod -R 777 /code
20-
USER player

docker/java/Dockerfile

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,10 @@ FROM openjdk:11-jdk-slim
22

33
WORKDIR /code
44

5-
# Install wget to download dependencies
65
RUN apt-get update && apt-get install -y wget
76

8-
# Download JUnit and dependencies to a shorter path
97
RUN wget https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2.jar -P /lib/
108
RUN wget https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar -P /lib/
119
RUN wget https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar -P /lib/
1210

13-
# Set CLASSPATH environment variable with shorter path
1411
ENV CLASSPATH=/lib/*:/code
15-
16-
# Set up security
17-
RUN useradd -m player
18-
RUN chown -R player:player /code
19-
RUN chmod -R 777 /code
20-
USER player

docker/python/Dockerfile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
FROM python:3.9-slim
1+
FROM python:3.9-alpine
22

33
WORKDIR /code
44

5-
# Install any needed packages
65
RUN pip install typing-extensions
7-
8-
# Set security limits
9-
RUN useradd -m player
10-
RUN chown -R player:player /code
11-
RUN chmod -R 777 /code
12-
USER player

0 commit comments

Comments
 (0)