forked from wubbl0rz/VmChamp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from zwoefler/fix-dockerfile
Fix dockerfile
- Loading branch information
Showing
1 changed file
with
10 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
FROM centos:7 AS build | ||
FROM ubuntu:20.04 AS build | ||
WORKDIR /App | ||
|
||
RUN ulimit -n 1024 && yum -y update | ||
RUN ulimit -n 1024 && yum -y install curl zlib-devel build-essential | ||
RUN ulimit -n 1024 && yum -y groupinstall 'Development Tools' | ||
# Set variables to configure timezone non-interactively | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Etc/UTC | ||
|
||
RUN apt-get update && apt-get install -y curl zlib1g-dev build-essential libicu-dev tzdata | ||
|
||
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 8.0 | ||
|
||
COPY *.cs ./ | ||
COPY *.csproj ./ | ||
ARG DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 | ||
ARG TARGET_VERSION | ||
RUN ~/.dotnet/dotnet publish -r linux-x64 --configuration Release -p:Version=$TARGET_VERSION --self-contained=true -p:PublishAot=true -p:StripSymbols=true -o build | ||
|
||
FROM scratch as output | ||
FROM scratch AS output | ||
COPY --from=build /App/build/VmChamp /VmChamp | ||
|
||
FROM build as release | ||
FROM build AS release | ||
COPY --from=build /App/build/VmChamp /VmChamp | ||
|