Skip to content

Commit 9dacbd5

Browse files
authored
update runc and upgrade .Net versions on Ubuntu and AL(x86_64) images (#703)
Co-authored-by: zhouyli <[email protected]>
1 parent 211ddf6 commit 9dacbd5

File tree

7 files changed

+43
-6
lines changed

7 files changed

+43
-6
lines changed

al2/x86_64/standard/4.0/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ RUN set -ex \
237237
&& ln -s /opt/microsoft/powershell/$POWERSHELL_VERSION/pwsh /usr/bin/pwsh
238238

239239
#DotNet 6.0
240-
ENV DOTNET_60_SDK_VERSION="6.0.410"
240+
ENV DOTNET_60_SDK_VERSION="6.0.418"
241241
ENV DOTNET_ROOT="/root/.dotnet"
242242

243243
# Add .NET Core 6.0 Global Tools install folder to PATH
@@ -338,6 +338,11 @@ RUN set -ex \
338338
&& tar --extract --file docker.tgz --strip-components 1 --directory /usr/local/bin/ \
339339
&& rm docker.tgz \
340340
&& docker -v \
341+
# replace runc package to resolve CVE-2024-21626
342+
&& yum -y install runc \
343+
&& rm -f /usr/local/bin/runc \
344+
&& ln -s /usr/sbin/runc /usr/local/bin/runc \
345+
&& runc -v \
341346
# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box
342347
&& groupadd dockremap \
343348
&& useradd -g dockremap dockremap \

al2/x86_64/standard/5.0/Dockerfile

+7-2
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ RUN curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o /tmp/awscli
244244
&& aws --version
245245

246246
#DotNet 6.0
247-
ENV DOTNET_6_SDK_VERSION="6.0.417"
248-
ENV DOTNET_8_SDK_VERSION="8.0.100"
247+
ENV DOTNET_6_SDK_VERSION="6.0.418"
248+
ENV DOTNET_8_SDK_VERSION="8.0.101"
249249
ENV DOTNET_6_GLOBAL_JSON_SDK_VERSION="6.0.0"
250250
ENV DOTNET_8_GLOBAL_JSON_SDK_VERSION="8.0.0"
251251
ENV DOTNET_ROOT="/root/.dotnet"
@@ -377,6 +377,11 @@ RUN set -ex \
377377
&& tar --extract --file docker.tgz --strip-components 1 --directory /usr/local/bin/ \
378378
&& rm docker.tgz \
379379
&& docker -v \
380+
# replace runc package to resolve CVE-2024-21626
381+
&& yum -y install runc \
382+
&& rm -f /usr/local/bin/runc \
383+
&& ln -s /usr/sbin/runc /usr/local/bin/runc \
384+
&& runc -v \
380385
# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box
381386
&& groupadd dockremap \
382387
&& useradd -g dockremap dockremap \

al2/x86_64/standard/corretto11/Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ RUN set -ex \
8686
&& tar --extract --file docker.tgz --strip-components 1 --directory /usr/local/bin/ \
8787
&& rm docker.tgz \
8888
&& docker -v \
89+
# replace runc package to resolve CVE-2024-21626
90+
&& amazon-linux-extras enable docker \
91+
&& yum -y install runc \
92+
&& rm -f /usr/local/bin/runc \
93+
&& ln -s /usr/sbin/runc /usr/local/bin/runc \
94+
&& runc -v \
8995
# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box
9096
&& groupadd dockremap \
9197
&& useradd -g dockremap dockremap \

al2/x86_64/standard/corretto8/Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ RUN set -ex \
8686
&& tar --extract --file docker.tgz --strip-components 1 --directory /usr/local/bin/ \
8787
&& rm docker.tgz \
8888
&& docker -v \
89+
# replace runc package to resolve CVE-2024-21626
90+
&& amazon-linux-extras enable docker \
91+
&& yum -y install runc \
92+
&& rm -f /usr/local/bin/runc \
93+
&& ln -s /usr/sbin/runc /usr/local/bin/runc \
94+
&& runc -v \
8995
# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box
9096
&& groupadd dockremap \
9197
&& useradd -g dockremap dockremap \

ubuntu/standard/5.0/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,11 @@ RUN set -ex \
434434
&& tar --extract --file docker.tgz --strip-components 1 --directory /usr/local/bin/ \
435435
&& rm docker.tgz \
436436
&& docker -v \
437+
# replace runc package to resolve CVE-2024-21626
438+
&& apt-get update && apt-get -y install runc \
439+
&& rm -f /usr/local/bin/runc \
440+
&& ln -s /usr/sbin/runc /usr/local/bin/runc \
441+
&& runc -v \
437442
# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box
438443
&& addgroup dockremap \
439444
&& useradd -g dockremap dockremap \

ubuntu/standard/6.0/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ FROM tools AS runtimes
143143

144144
#**************** .NET-CORE *******************************************************
145145

146-
ENV DOTNET_6_SDK_VERSION="6.0.410"
146+
ENV DOTNET_6_SDK_VERSION="6.0.418"
147147
ENV DOTNET_ROOT="/root/.dotnet"
148148

149149
# Add .NET Core 6 Global Tools install folder to PATH
@@ -353,6 +353,11 @@ RUN set -ex \
353353
&& tar --extract --file docker.tgz --strip-components 1 --directory /usr/local/bin/ \
354354
&& rm docker.tgz \
355355
&& docker -v \
356+
# replace runc package to resolve CVE-2024-21626
357+
&& apt-get update && apt-get -y install runc \
358+
&& rm -f /usr/local/bin/runc \
359+
&& ln -s /usr/sbin/runc /usr/local/bin/runc \
360+
&& runc -v \
356361
# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box
357362
&& addgroup dockremap \
358363
&& useradd -g dockremap dockremap \

ubuntu/standard/7.0/Dockerfile

+7-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ FROM tools AS runtimes
159159

160160
#**************** .NET-CORE *******************************************************
161161

162-
ENV DOTNET_6_SDK_VERSION="6.0.417"
163-
ENV DOTNET_8_SDK_VERSION="8.0.100"
162+
ENV DOTNET_6_SDK_VERSION="6.0.418"
163+
ENV DOTNET_8_SDK_VERSION="8.0.101"
164164
ENV DOTNET_6_GLOBAL_JSON_SDK_VERSION="6.0.0"
165165
ENV DOTNET_8_GLOBAL_JSON_SDK_VERSION="8.0.0"
166166
ENV DOTNET_ROOT="/root/.dotnet"
@@ -397,6 +397,11 @@ RUN set -ex \
397397
&& tar --extract --file docker.tgz --strip-components 1 --directory /usr/local/bin/ \
398398
&& rm docker.tgz \
399399
&& docker -v \
400+
# replace runc package to resolve CVE-2024-21626
401+
&& apt-get update && apt-get -y install runc \
402+
&& rm -f /usr/local/bin/runc \
403+
&& ln -s /usr/sbin/runc /usr/local/bin/runc \
404+
&& runc -v \
400405
# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box
401406
&& addgroup dockremap \
402407
&& useradd -g dockremap dockremap \

0 commit comments

Comments
 (0)