make docker image smaller

This commit is contained in:
Alexander Bentkamp
2023-05-04 16:19:23 +02:00
parent 214dc1e07b
commit a993a42f98

View File

@@ -2,29 +2,23 @@ FROM ubuntu:18.04
WORKDIR / WORKDIR /
RUN apt-get update RUN apt-get update && apt-get install -y git curl libatomic1
RUN apt-get upgrade -y
RUN apt-get install -y git curl libatomic1
# Install elan # 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 \
RUN ./elan-init -y --default-toolchain leanprover/lean4:nightly-2022-09-23 && ./elan-init -y --default-toolchain none
# TODO: Read out lean version from lean-toolchain file
ENV PATH="${PATH}:/root/.elan/bin" ENV PATH="${PATH}:/root/.elan/bin"
# Copy the game to `game` # Copy the game to `game`
COPY . ./game COPY . ./game
WORKDIR /game WORKDIR /game
RUN lake update RUN lake update && lake exe cache get
RUN lake exe cache get
WORKDIR /game/lake-packages/GameServer/server/ WORKDIR /game/lake-packages/GameServer/server/
RUN lake clean RUN lake clean && lake build
RUN lake build
WORKDIR /game WORKDIR /game
RUN lake clean RUN lake clean && lake build
RUN lake build
WORKDIR /game/lake-packages/GameServer/server/build/bin/ WORKDIR /game/lake-packages/GameServer/server/build/bin/