Files
Cockatrice/Dockerfile
tooomm 471393b421 remove ccache again
cache mounts are not part of GHA caches from docker action
2026-07-19 16:33:38 +02:00

55 lines
1.1 KiB
Docker

# -------- Build Stage --------
FROM ubuntu:26.04 AS build
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
ninja-build \
file \
g++ \
git \
libmariadb-dev-compat \
libprotobuf-dev \
libqt6sql6-mysql \
qt6-websockets-dev \
protobuf-compiler \
qt6-tools-dev \
qt6-tools-dev-tools
WORKDIR /src
COPY . .
RUN cmake \
-S . \
-B build \
-G Ninja \
-DWITH_SERVER=1 \
-DWITH_CLIENT=0 \
-DWITH_ORACLE=0 \
&& cmake --build build \
&& cmake --install build
# -------- Runtime Stage (clean) --------
FROM ubuntu:26.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libprotobuf32t64 \
libqt6sql6-mysql \
libqt6websockets6 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Only copy installed binaries, not source
COPY --from=build /usr/local /usr/local
WORKDIR /home/servatrice
EXPOSE 4748
ENTRYPOINT [ "servatrice", "--log-to-console" ]