From 43b2114444d7e9577d16ba463b7ea7cb150502c2 Mon Sep 17 00:00:00 2001 From: Wassim DHIF Date: Fri, 8 Oct 2021 18:36:16 +0200 Subject: [PATCH] Add Ubuntu build Docker image --- docker/Dockerfile.ubuntu | 23 +++++++++++++++++++++++ docker/README.md | 17 +++++++++++++++++ docker/build.sh | 13 +++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 docker/Dockerfile.ubuntu create mode 100644 docker/README.md create mode 100755 docker/build.sh diff --git a/docker/Dockerfile.ubuntu b/docker/Dockerfile.ubuntu new file mode 100644 index 0000000000..51aaa6465e --- /dev/null +++ b/docker/Dockerfile.ubuntu @@ -0,0 +1,23 @@ +FROM ubuntu +LABEL maintainer="Wassim DHIF " + +ENV NPROC=1 + +RUN apt-get update \ + && apt-get install -y --no-install-recommends software-properties-common apt-utils \ + && add-apt-repository ppa:openmw/openmw \ + && apt-get update \ + && apt-get install -y --no-install-recommends openmw openmw-launcher \ + && apt-get install -y --no-install-recommends git build-essential cmake \ + libopenal-dev libopenscenegraph-dev libbullet-dev libsdl2-dev \ + libmygui-dev libunshield-dev liblz4-dev libtinyxml-dev libqt5opengl5-dev \ + libboost-filesystem-dev libboost-program-options-dev libboost-iostreams-dev \ + libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev \ + librecastnavigation-dev libluajit-5.1-dev + +COPY build.sh /build.sh + +RUN mkdir /openmw +WORKDIR /openmw + +ENTRYPOINT ["/build.sh"] diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000000..4c4131c235 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,17 @@ +# Build OpenMW using Docker + +## Build Docker image + +Replace `LINUX_VERSION` with the Linux distribution you wish to use. +``` +docker build -f Dockerfile.LINUX_VERSION -t openmw.LINUX_VERSION . +``` + +## Build OpenMW using Docker + +Labeling systems like SELinux require that proper labels are placed on volume content mounted into a container. +Without a label, the security system might prevent the processes running inside the container from using the content. +The Z option tells Docker to label the content with a private unshared label. +``` +docker run -v /path/to/openmw:/openmw:Z -e NPROC=2 -it openmw.LINUX_VERSION +``` diff --git a/docker/build.sh b/docker/build.sh new file mode 100755 index 0000000000..0f79161379 --- /dev/null +++ b/docker/build.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -xe + +# Creating build directory... +mkdir -p build +cd build + +# Running CMake... +cmake ../ + +# Building with $NPROC CPU... +make -j $NPROC