Skip to content

Commit 741e0e5

Browse files
committed
wip
1 parent 4aeaeef commit 741e0e5

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed
File renamed without changes.

template/kernel/python3_user.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"argv": [
3+
"sudo",
4+
"-u",
5+
"user",
6+
"/usr/local/bin/python",
7+
"-m",
8+
"ipykernel_launcher",
9+
"-f",
10+
"{connection_file}"
11+
],
12+
"display_name": "Python 3 (user)",
13+
"language": "python",
14+
"metadata": {
15+
"debugger": true
16+
}
17+
}

template/test.Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@ COPY --from=eclipse-temurin:11-jdk $JAVA_HOME $JAVA_HOME
77
ENV PATH="${JAVA_HOME}/bin:${PATH}"
88

99
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
10-
build-essential curl git util-linux jq nodejs npm fonts-noto-cjk
10+
build-essential curl git util-linux jq nodejs npm fonts-noto-cjk sudo
11+
12+
# Create new user with root privileges while keeping root user
13+
RUN useradd -m -s /bin/bash user && \
14+
echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
15+
echo 'user:password' | chpasswd && \
16+
usermod -aG sudo user && \
17+
chmod -R o+rx /root && \
18+
chown -R user:user /root
1119

1220
ENV PIP_DEFAULT_TIMEOUT=100 \
1321
PIP_DISABLE_PIP_VERSION_CHECK=1 \

0 commit comments

Comments
 (0)