Merge pull request #2 from VPeruS/docker-build

[build] Added configuration to allow building in container
This commit is contained in:
Kelsi Rae Davis 2026-02-21 07:32:56 -08:00 committed by GitHub
commit 12597294d9
4 changed files with 62 additions and 0 deletions

View file

@ -88,6 +88,12 @@ sudo pacman -S sdl2 glew glm openssl cmake base-devel \
stormlib # for asset_extract
```
### Container build
You can use podman to build application in separate container.
- Install podman
- Then run `container/build-in-container.sh`
- Artifacts can be found in `/tmp/wowee.[random value].[commit hash]`
### Game Data
This project requires WoW client data that you extract from your own legally obtained install.

19
container/build-in-container.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
set -eu
set -o pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
podman build \
-f "${SCRIPT_DIR}/builder-ubuntu.Dockerfile" \
-t wowee-builder-ubuntu
BUILD_DIR="$(mktemp --tmpdir -d wowee.XXXXX \
--suffix=".$(cd "${PROJECT_ROOT}"; git rev-parse --short HEAD)")"
podman run \
--mount "type=bind,src=${PROJECT_ROOT},dst=/WoWee-src,ro=true" \
--mount "type=bind,src=${BUILD_DIR},dst=/build" \
localhost/wowee-builder-ubuntu \
./build-wowee.sh

14
container/build-wowee.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
set -eu
set -o pipefail
cp -r /WoWee-src /WoWee
pushd /WoWee
./build.sh
popd
pushd /WoWee/build
cmake --install . --prefix=/build
popd

View file

@ -0,0 +1,23 @@
FROM ubuntu:24.04
RUN apt-get update && \
apt install -y \
cmake \
build-essential \
pkg-config \
git \
libsdl2-dev \
libglew-dev \
libglm-dev \
libssl-dev \
zlib1g-dev \
libavformat-dev \
libavcodec-dev \
libswscale-dev \
libavutil-dev \
libstorm-dev && \
rm -rf /var/lib/apt/lists/*
COPY build-wowee.sh /
ENTRYPOINT ./build-wowee.sh