mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 00:55:09 -07:00
Docker: Build ARM image natively (#7046)
* native builds + merge * naming and ordering * use ninja and cmake build * add ccache and cache mounts * formatting * Update servatrice.cpp * Revert "Update servatrice.cpp" This reverts commit 3acc684135c6db9baa17d00deaceecf8f7079721. * remove ccache again cache mounts are not part of GHA caches from docker action * comments and cleanup Use buildx provided in runner, see https://github.com/actions/runner-images/blob/main/images/ubuntu-slim/ubuntu-slim-Readme.md * more explicit * comments, first pass * ${{ runner.temp }} * $(printf "$GHCR_IMAGE@sha256:%s " *) * follow docker docs for latest and extract short semver from our tags * not so pretty, but allows the easy inspect at the end * add Servatrice name * add links to runner images * comments, second pass * cleanup
This commit is contained in:
parent
f425dcc93e
commit
976546fbe0
2 changed files with 172 additions and 58 deletions
52
Dockerfile
52
Dockerfile
|
|
@ -3,35 +3,45 @@ FROM ubuntu:26.04 AS build
|
|||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
cmake \
|
||||
file \
|
||||
g++ \
|
||||
git \
|
||||
libmariadb-dev-compat \
|
||||
libprotobuf-dev \
|
||||
libqt6sql6-mysql \
|
||||
qt6-websockets-dev \
|
||||
protobuf-compiler \
|
||||
qt6-tools-dev \
|
||||
qt6-tools-dev-tools
|
||||
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 mkdir build && cd build && \
|
||||
cmake .. -DWITH_SERVER=1 -DWITH_CLIENT=0 -DWITH_ORACLE=0 && \
|
||||
make -j$(nproc) && \
|
||||
make install
|
||||
RUN cmake \
|
||||
-S . \
|
||||
-B build \
|
||||
-G Ninja \
|
||||
-DWITH_CLIENT=0 \
|
||||
-DWITH_ORACLE=0 \
|
||||
-DWITH_SERVER=1 \
|
||||
&& cmake --build build \
|
||||
&& cmake --install build
|
||||
|
||||
|
||||
# -------- Runtime Stage (clean) --------
|
||||
FROM ubuntu:26.04
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libprotobuf32t64 \
|
||||
libqt6sql6-mysql \
|
||||
libqt6websockets6 \
|
||||
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/*
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue