Add Ubuntu build Docker image

pull/3225/head
Wassim DHIF 3 years ago
parent bf85745931
commit 43b2114444

@ -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"]

@ -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
```

@ -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
Loading…
Cancel
Save