Skip to content

Commit c8a1cab

Browse files
Copilotcommjoen
andcommitted
Fix dotnet installation in wrongsecrets-desktop Dockerfiles
Co-authored-by: commjoen <[email protected]>
1 parent 066b5aa commit c8a1cab

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

Dockerfile_webdesktop

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN \
99

1010
RUN \
1111
echo "**** install packages ****" && \
12-
apk add --no-cache shadow keepassxc radare2 aws-cli geany git gdb build-base icu-libs icu-data-full&& \
12+
apk add --no-cache shadow keepassxc radare2 aws-cli geany git gdb build-base icu-libs icu-data-full ca-certificates libgcc libstdc++ zlib && \
1313
echo "**** adding abc user to root for Docker ****" && \
1414
usermod -aG root abc && \
1515
touch /var/run/docker.sock && \
@@ -18,14 +18,13 @@ RUN \
1818
rm -rf /tmp/*
1919

2020
RUN \
21-
export DOTNET_INSTALL_DIR="/etc/dotnet" && \
2221
echo "installing dotnet" && \
2322
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && \
2423
chmod +x dotnet-install.sh && \
25-
./dotnet-install.sh --version latest && \
24+
./dotnet-install.sh --install-dir /etc/dotnet --version latest && \
2625
export DOTNET_ROOT=/etc/dotnet && \
27-
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools && \
28-
export PATH="$PATH:/config/.dotnet/tools" &&\
26+
export PATH="/etc/dotnet:/etc/dotnet/tools:$PATH" && \
27+
dotnet --info && \
2928
dotnet tool install ilspycmd --version 9.0.0.7889 --tool-path /etc/dotnet/tools
3029

3130
# Add secret handling for Kubernetes-specific Docker builds

Dockerfile_webdesktopk8s

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN \
99

1010
RUN \
1111
echo "**** install packages ****" && \
12-
apk add --no-cache shadow keepassxc radare2 aws-cli geany git gdb build-base icu-libs icu-data-full && \
12+
apk add --no-cache shadow keepassxc radare2 aws-cli geany git gdb build-base icu-libs icu-data-full ca-certificates libgcc libstdc++ zlib && \
1313
echo "**** adding abc user to root for Docker ****" && \
1414
usermod -aG root abc && \
1515
touch /var/run/docker.sock && \
@@ -23,14 +23,13 @@ RUN echo "**** clone wrongsecrets.git for webtop in k8s ****" && \
2323
git clone https://github.com/OWASP/wrongsecrets.git
2424

2525
RUN \
26-
export DOTNET_INSTALL_DIR="/etc/dotnet" && \
2726
echo "installing dotnet" && \
2827
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && \
2928
chmod +x dotnet-install.sh && \
30-
./dotnet-install.sh --version latest && \
29+
./dotnet-install.sh --install-dir /etc/dotnet --version latest && \
3130
export DOTNET_ROOT=/etc/dotnet && \
32-
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools && \
33-
export PATH="$PATH:/config/.dotnet/tools" &&\
31+
export PATH="/etc/dotnet:/etc/dotnet/tools:$PATH" && \
32+
dotnet --info && \
3433
dotnet tool install ilspycmd --version 9.0.0.7889 --tool-path /etc/dotnet/tools
3534

3635
# Add a secret using --mount and write it to a specific file path for the challenge

0 commit comments

Comments
 (0)