Files
NNG/Dockerfile

36 lines
753 B
Docker
Raw Permalink Normal View History

2023-05-05 14:57:55 +02:00
FROM ubuntu:22.04
2023-04-28 15:28:38 +02:00
WORKDIR /
2023-09-08 09:35:27 +02:00
RUN apt-get update
RUN apt-get install -y git curl libatomic1
2023-04-28 15:28:38 +02:00
# Install elan
2023-07-23 20:31:27 +02:00
RUN curl -sSfL https://github.com/leanprover/elan/releases/download/v1.4.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz\
2023-05-04 16:19:23 +02:00
&& ./elan-init -y --default-toolchain none
2023-04-28 15:28:38 +02:00
ENV PATH="${PATH}:/root/.elan/bin"
2023-05-04 11:48:58 +02:00
# Copy the game to `game`
COPY . ./game
2023-04-28 15:51:46 +02:00
2023-07-23 20:31:27 +02:00
# Update the game
2023-05-04 11:48:58 +02:00
WORKDIR /game
2023-05-08 18:31:18 +02:00
RUN lake update
2023-07-23 20:31:27 +02:00
RUN lake clean
RUN lake exe cache get
2023-04-28 15:28:38 +02:00
2023-07-23 20:31:27 +02:00
# Build the gameserver first
2023-05-04 11:48:58 +02:00
WORKDIR /game/lake-packages/GameServer/server/
2023-07-23 20:31:27 +02:00
RUN lake clean
RUN lake build
2023-05-04 11:48:58 +02:00
2023-07-23 20:31:27 +02:00
# Build the game
2023-05-04 11:48:58 +02:00
WORKDIR /game
2023-07-23 21:23:07 +02:00
RUN lake build
2023-04-28 15:28:38 +02:00
2023-07-23 20:31:27 +02:00
# Remove the cache from the docker container
2023-07-23 21:23:07 +02:00
RUN rm -rf /root/.cache
2023-05-05 11:38:28 +02:00
2023-07-23 20:31:27 +02:00
WORKDIR /game/lake-packages/GameServer/server/build/bin/
2023-05-15 18:00:00 +02:00
CMD ./gameserver --server /game/