Skip to content

Commit 75f3aa2

Browse files
Copilotcommjoen
andcommitted
Switch to Alpine .NET packages and fix pre-commit formatting issues
Co-authored-by: commjoen <[email protected]>
1 parent 07ec9d9 commit 75f3aa2

File tree

3 files changed

+17
-23
lines changed

3 files changed

+17
-23
lines changed

Dockerfile_webdesktop

Lines changed: 7 additions & 10 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 ca-certificates libgcc libstdc++ zlib && \
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 libintl musl-locales && \
1313
echo "**** adding abc user to root for Docker ****" && \
1414
usermod -aG root abc && \
1515
touch /var/run/docker.sock && \
@@ -18,17 +18,14 @@ RUN \
1818
rm -rf /tmp/*
1919

2020
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 --channel 6.0 --version latest && \
25-
rm dotnet-install.sh && \
26-
export DOTNET_ROOT=/etc/dotnet && \
27-
export PATH="/etc/dotnet:/etc/dotnet/tools:$PATH" && \
21+
echo "installing dotnet via Alpine packages" && \
22+
apk add --no-cache dotnet8-sdk dotnet8-runtime aspnetcore8-runtime && \
23+
export DOTNET_ROOT=/usr/share/dotnet && \
24+
export PATH="/usr/share/dotnet:$PATH" && \
2825
echo "Checking dotnet installation..." && \
29-
/etc/dotnet/dotnet --info && \
26+
dotnet --info && \
3027
echo "Installing ilspycmd..." && \
31-
/etc/dotnet/dotnet tool install ilspycmd --version 9.0.0.7889 --tool-path /etc/dotnet/tools
28+
dotnet tool install --global ilspycmd --version 9.0.0.7889
3229

3330
WORKDIR /config/Desktop
3431

Dockerfile_webdesktopk8s

Lines changed: 7 additions & 10 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 ca-certificates libgcc libstdc++ zlib && \
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 libintl musl-locales && \
1313
echo "**** adding abc user to root for Docker ****" && \
1414
usermod -aG root abc && \
1515
touch /var/run/docker.sock && \
@@ -23,17 +23,14 @@ RUN echo "**** clone wrongsecrets.git for webtop in k8s ****" && \
2323
git clone https://github.com/OWASP/wrongsecrets.git
2424

2525
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 --channel 6.0 --version latest && \
30-
rm dotnet-install.sh && \
31-
export DOTNET_ROOT=/etc/dotnet && \
32-
export PATH="/etc/dotnet:/etc/dotnet/tools:$PATH" && \
26+
echo "installing dotnet via Alpine packages" && \
27+
apk add --no-cache dotnet8-sdk dotnet8-runtime aspnetcore8-runtime && \
28+
export DOTNET_ROOT=/usr/share/dotnet && \
29+
export PATH="/usr/share/dotnet:$PATH" && \
3330
echo "Checking dotnet installation..." && \
34-
/etc/dotnet/dotnet --info && \
31+
dotnet --info && \
3532
echo "Installing ilspycmd..." && \
36-
/etc/dotnet/dotnet tool install ilspycmd --version 9.0.0.7889 --tool-path /etc/dotnet/tools
33+
dotnet tool install --global ilspycmd --version 9.0.0.7889
3734

3835
WORKDIR /config/Desktop
3936

wrongsecret-desktop-resources/startwm.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

3-
export DOTNET_ROOT=/etc/dotnet
4-
export DOTNET_INSTALL_DIR="/etc/dotnet"
5-
export PATH="$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools"
3+
export DOTNET_ROOT=/usr/share/dotnet
4+
export DOTNET_INSTALL_DIR="/usr/share/dotnet"
5+
export PATH="$PATH:$DOTNET_ROOT:/root/.dotnet/tools"
66
export PATH="$PATH:/config/.dotnet/tools"
77
/startpulse.sh &
88
ln -s -r /var/tmp/wrongsecrets /config/Desktop/wrongsecrets

0 commit comments

Comments
 (0)