summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpsi29a <psi29a@gmail.com>2021-12-20 07:56:51 +0000
committerpsi29a <psi29a@gmail.com>2021-12-20 07:56:51 +0000
commit64c8ef42287550b95a335f183c8fdb48849b11da (patch)
tree2ce8084f03efdcb5a64c02e1af46cf9c7946ac65
parent46564f08adfa71dd17b6387b867c3f5752d3cccc (diff)
parent43b2114444d7e9577d16ba463b7ea7cb150502c2 (diff)
Merge branch 'master' into 'master'
Add Ubuntu build Docker image See merge request OpenMW/openmw!1272
-rw-r--r--docker/Dockerfile.ubuntu23
-rw-r--r--docker/README.md17
-rwxr-xr-xdocker/build.sh13
3 files changed, 53 insertions, 0 deletions
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 <wassimdhif@gmail.com>"
+
+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