Skip to content

Commit 314eff8

Browse files
authored
Update Dockerfile
1 parent cd0167a commit 314eff8

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

dotnet/8/Dockerfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,20 @@ ENV DEBIAN_FRONTEND=noninteractive
88
RUN apt update -y \
99
&& apt upgrade -y \
1010
&& apt install -y apt-transport-https wget curl iproute2 libgdiplus tini python3 python3-pip python3-venv \
11+
# Download the installer script
1112
&& wget https://dot.net/v1/dotnet-install.sh \
12-
# --- DOTNET 9 UPDATE START ---
13-
# Updated URL to /dotnet/9.0 and grep pattern to sdk-9.*
14-
&& D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/9.0 | grep -i '<h3 id="sdk-9.*">SDK 9.*.*</h3>' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \
15-
# --- DOTNET 9 UPDATE END ---
1613
&& chmod +x dotnet-install.sh \
17-
&& ./dotnet-install.sh -i /usr/share -v $D_V \
18-
&& ln -s /usr/share/dotnet /usr/bin/dotnet
14+
# --- INSTALL DOTNET 9 ---
15+
&& ./dotnet-install.sh --channel 9.0 --install-dir /usr/share/dotnet \
16+
# --- INSTALL DOTNET 8 ---
17+
&& ./dotnet-install.sh --channel 8.0 --install-dir /usr/share/dotnet \
18+
# Create the symlink (only needed once)
19+
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
1920

2021
# 2. Set Playwright Environment Variables
21-
# This ensures browsers are installed globally in /usr/local/share
2222
ENV PLAYWRIGHT_BROWSERS_PATH=/usr/local/share/playwright
2323

2424
# 3. Install Playwright and Browsers
25-
# We install the library, then download the browsers, then install OS dependencies
2625
RUN pip3 install playwright --break-system-packages \
2726
&& playwright install chromium \
2827
&& playwright install-deps chromium
@@ -35,5 +34,5 @@ STOPSIGNAL SIGINT
3534

3635
COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh
3736
RUN chmod +x /entrypoint.sh
38-
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
37+
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
3938
CMD ["/entrypoint.sh"]

0 commit comments

Comments
 (0)