Skip to content

Commit

Permalink
Install .NET 9
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasArdal committed Nov 15, 2024
1 parent 77147fd commit 3051040
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Container image that runs your code
FROM alpine:3.18

# Install necessary dependencies
RUN apk update && \
apk add --no-cache wget bash ca-certificates-bundle libgcc libssl3 libstdc++ zlib icu-libs && \
rm -rf /var/cache/apk/*

# Download and install .NET Core SDK
RUN wget -q https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh --version latest --install-dir /usr/share/dotnet && \
rm dotnet-install.sh

# Add .NET to the PATH environment variable
ENV PATH="$PATH:/usr/share/dotnet"

# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh

RUN chmod +x /entrypoint.sh

# Code file to execute when the docker container starts up (`entrypoint.sh`)
# Container image that runs your code
FROM alpine:3.18

# Install necessary dependencies
RUN apk update && \
apk add --no-cache wget bash ca-certificates-bundle libgcc libssl3 libstdc++ zlib icu-libs && \
rm -rf /var/cache/apk/*

# Download and install .NET Core SDK
RUN wget -q https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh --channel 9.0 --install-dir /usr/share/dotnet && \
rm dotnet-install.sh

# Add .NET to the PATH environment variable
ENV PATH="$PATH:/usr/share/dotnet"

# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh

RUN chmod +x /entrypoint.sh

# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/entrypoint.sh"]

0 comments on commit 3051040

Please sign in to comment.