Skip to content

Commit

Permalink
Merge pull request #1 from zwoefler/fix-dockerfile
Browse files Browse the repository at this point in the history
Fix dockerfile
  • Loading branch information
mzwoelfer authored Jun 27, 2024
2 parents 63d9704 + 8373673 commit e957cc4
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Dockerfile
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

0 comments on commit e957cc4

Please sign in to comment.