Skip to content

Commit cd26dce

Browse files
committed
fix for new containers
1 parent 3a510b4 commit cd26dce

File tree

2 files changed

+4
-43
lines changed

2 files changed

+4
-43
lines changed

Dockerfile_webdesktop

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
FROM linuxserver/webtop:latest
22
LABEL NAME="OWASP WrongSecrets Web Desktop" MAINTAINER="Jeroen Willemsen"
33

4-
# RUN \
5-
# echo "*** install kubectl ***" && \
6-
# curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" &&\
7-
# sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl &&\
8-
# rm kubectl
9-
104
RUN \
115
echo "**** install packages ****" && \
126
apk add --no-cache shadow keepassxc kubectl radare2 dotnet9-sdk aws-cli geany git gdb build-base icu-libs icu-data-full ca-certificates libgcc libstdc++ zlib && \
@@ -17,16 +11,6 @@ RUN \
1711
echo "**** cleanup ****" && \
1812
rm -rf /tmp/*
1913

20-
# RUN \
21-
# echo "installing dotnet" && \
22-
# wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && \
23-
# chmod +x dotnet-install.sh && \
24-
# ./dotnet-install.sh --install-dir /etc/dotnet --version latest && \
25-
# export DOTNET_ROOT=/etc/dotnet && \
26-
# export PATH="/etc/dotnet:/etc/dotnet/tools:$PATH" && \
27-
# dotnet --info && \
28-
# dotnet tool install ilspycmd --version 9.0.0.7889 --tool-path /etc/dotnet/tools
29-
3014
RUN dotnet tool install ilspycmd --version 9.0.0.7889 --tool-path /etc/dotnet/tools
3115
# Add secret handling for Kubernetes-specific Docker builds
3216
# Create the /app directory to store the secret

Dockerfile_webdesktopk8s

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,18 @@
1-
FROM lscr.io/linuxserver/webtop:4.16-r0-ls95
1+
FROM linuxserver/webtop:latest
22
LABEL NAME="OWASP WrongSecrets Web Desktop" MAINTAINER="Jeroen Willemsen"
33

4-
RUN \
5-
echo "*** install kubectl ***" && \
6-
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" &&\
7-
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl &&\
8-
rm kubectl
9-
104
RUN \
115
echo "**** install packages ****" && \
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 && \
6+
apk add --no-cache shadow keepassxc kubectl radare2 dotnet9-sdk aws-cli geany git gdb build-base icu-libs icu-data-full ca-certificates libgcc libstdc++ zlib && \
137
echo "**** adding abc user to root for Docker ****" && \
148
usermod -aG root abc && \
159
touch /var/run/docker.sock && \
1610
chown abc:abc /var/run/docker.sock && \
1711
echo "**** cleanup ****" && \
1812
rm -rf /tmp/*
1913

20-
RUN echo "**** clone wrongsecrets.git for webtop in k8s ****" && \
21-
mkdir /var/tmp/wrongsecrets && \
22-
cd /var/tmp/wrongsecrets && \
23-
git clone https://github.com/OWASP/wrongsecrets.git
24-
25-
RUN \
26-
echo "installing dotnet" && \
27-
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && \
28-
chmod +x dotnet-install.sh && \
29-
./dotnet-install.sh --install-dir /etc/dotnet --version latest && \
30-
export DOTNET_ROOT=/etc/dotnet && \
31-
export PATH="/etc/dotnet:/etc/dotnet/tools:$PATH" && \
32-
dotnet --info && \
33-
dotnet tool install ilspycmd --version 9.0.0.7889 --tool-path /etc/dotnet/tools
34-
35-
# Add a secret using --mount and write it to a specific file path for the challenge
14+
RUN dotnet tool install ilspycmd --version 9.0.0.7889 --tool-path /etc/dotnet/tools
15+
# Add secret handling for Kubernetes-specific Docker builds
3616
# Create the /app directory to store the secret
3717
RUN mkdir -p /app
3818

@@ -51,7 +31,4 @@ COPY src/main/resources/executables/secrchallenge.json /var/tmp/wrongsecrets/
5131
COPY src/test/resources/alibabacreds.kdbx /var/tmp/wrongsecrets/
5232
COPY wrongsecret-desktop-resources/welcome.md /var/tmp/wrongsecrets/
5333

54-
55-
RUN sudo chown abc /var/tmp/wrongsecrets
56-
5734
COPY wrongsecret-desktop-resources/startwm.sh /defaults/startwm.sh

0 commit comments

Comments
 (0)