update Dockerfile

This commit is contained in:
Jon Eugster
2023-07-23 20:31:27 +02:00
parent 2802e2ac08
commit 2255e5a211

View File

@@ -5,25 +5,30 @@ WORKDIR /
RUN apt-get update && apt-get install -y git curl libatomic1
# Install elan
RUN curl -sSfL https://github.com/leanprover/elan/releases/download/v1.4.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz \
RUN curl -sSfL https://github.com/leanprover/elan/releases/download/v1.4.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz\
&& ./elan-init -y --default-toolchain none
ENV PATH="${PATH}:/root/.elan/bin"
# Copy the game to `game`
COPY . ./game
# Update the game
WORKDIR /game
RUN lake update
RUN lake clean
RUN lake exe cache get
# Build the GameServer
# Build the gameserver first
WORKDIR /game/lake-packages/GameServer/server/
RUN lake clean && lake build
RUN lake clean
RUN lake build
# Build the Game
# Remove `lake exe cache get` if your game does not depend on `mathlib`
# Build the game
WORKDIR /game
RUN lake clean && lake exe cache get && lake build
lake build
# Remove the cache from the docker container
rm -rf /root/.cache
WORKDIR /game/lake-packages/GameServer/server/build/bin/
CMD ./gameserver --server /game/