Skip to content

Commit 9ccaf45

Browse files
committed
Update docker files
1 parent 46d7808 commit 9ccaf45

7 files changed

Lines changed: 28 additions & 116 deletions

File tree

eng/alpine/Dockerfile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ ENV SSH_PORT=2222 \
66
TZ=UTC \
77
LC_ALL=en_US.UTF-8 \
88
LANG=en_US.UTF-8 \
9-
APPUSER_UID=1000 \
10-
APP_UID=1654
9+
APPUSER_UID=1000
1110

1211
# Copy files in structure /etc/ssh/sshd_config, /opt/startup/init_container.sh /tmp/ssh_setup.sh
1312
COPY src/ /
@@ -28,12 +27,4 @@ RUN apk add --no-cache openssh tzdata icu-data-full icu-libs \
2827
--uid=$APPUSER_UID \
2928
--ingroup=appuser \
3029
--disabled-password \
31-
appuser \
32-
&& addgroup \
33-
--gid=$APP_UID \
34-
app \
35-
&& adduser \
36-
--uid=$APP_UID \
37-
--ingroup=app \
38-
--disabled-password \
39-
app
30+
appuser
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ ENV SSH_PORT=2222 \
66
TZ=UTC \
77
LC_ALL=en_US.UTF-8 \
88
LANG=en_US.UTF-8 \
9-
APPUSER_UID=1000
9+
APPUSER_UID=1000 \
10+
APP_UID=1654
1011

1112
# Copy files in structure /etc/ssh/sshd_config, /opt/startup/init_container.sh /tmp/ssh_setup.sh
1213
COPY src/ /
@@ -27,4 +28,12 @@ RUN apk add --no-cache openssh tzdata icu-data-full icu-libs \
2728
--uid=$APPUSER_UID \
2829
--ingroup=appuser \
2930
--disabled-password \
30-
appuser
31+
appuser \
32+
&& addgroup \
33+
--gid=$APP_UID \
34+
app \
35+
&& adduser \
36+
--uid=$APP_UID \
37+
--ingroup=app \
38+
--disabled-password \
39+
app

eng/alpine/Dockerfile-8.0

Lines changed: 0 additions & 30 deletions
This file was deleted.

eng/alpine/Dockerfile-9.0

Lines changed: 0 additions & 30 deletions
This file was deleted.

eng/debian/Dockerfile

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
ARG IMAGE_TAG=6.0-bullseye-slim
1+
ARG IMAGE_TAG=10.0-noble
22
FROM mcr.microsoft.com/dotnet/aspnet:${IMAGE_TAG} AS base
33

44
ENV SSH_PORT=2222 \
55
TZ=UTC \
6-
APPUSER_UID=1000 \
7-
APP_UID=1654
6+
APPUSER_UID=1000
87

98
# Copy files in structure /etc/ssh/sshd_config, /opt/startup/init_container.sh /tmp/ssh_setup.sh
109
COPY src/ /
@@ -18,20 +17,4 @@ RUN apt-get update \
1817
&& echo "root:Docker!" | chpasswd \
1918
&& chmod -R +x /opt/startup \
2019
&& (sleep 1;/opt/startup/ssh_setup.sh 2>&1 > /dev/null) \
21-
&& rm -rf /tmp/* \
22-
&& addgroup \
23-
--gid=$APPUSER_UID \
24-
appuser \
25-
&& adduser \
26-
--uid=$APPUSER_UID \
27-
--ingroup=appuser \
28-
--disabled-password \
29-
appuser \
30-
&& addgroup \
31-
--gid=$APP_UID \
32-
app \
33-
&& adduser \
34-
--uid=$APP_UID \
35-
--ingroup=app \
36-
--disabled-password \
37-
app
20+
&& rm -rf /tmp/*

eng/debian/Dockerfile-10.0-noble

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
ARG IMAGE_TAG=10.0-trixie-slim
1+
ARG IMAGE_TAG=6.0-bullseye-slim
22
FROM mcr.microsoft.com/dotnet/aspnet:${IMAGE_TAG} AS base
33

44
ENV SSH_PORT=2222 \
55
TZ=UTC \
6-
APPUSER_UID=1000
6+
APPUSER_UID=1000 \
7+
APP_UID=1654
78

89
# Copy files in structure /etc/ssh/sshd_config, /opt/startup/init_container.sh /tmp/ssh_setup.sh
910
COPY src/ /
@@ -25,4 +26,12 @@ RUN apt-get update \
2526
--uid=$APPUSER_UID \
2627
--ingroup=appuser \
2728
--disabled-password \
28-
appuser
29+
appuser \
30+
&& addgroup \
31+
--gid=$APP_UID \
32+
app \
33+
&& adduser \
34+
--uid=$APP_UID \
35+
--ingroup=app \
36+
--disabled-password \
37+
app

0 commit comments

Comments
 (0)