summaryrefslogtreecommitdiffhomepage
path: root/0.1.2/cli/Dockerfile
diff options
context:
space:
mode:
authorTed John <[email protected]>2018-05-20 17:15:55 +0100
committerTed John <[email protected]>2018-05-20 17:15:55 +0100
commitaa0e601318eddc65669681493b4e9bf5a176ed4c (patch)
treef34e6474c4d461bda53e97a04d2b6faeb39c4356 /0.1.2/cli/Dockerfile
parentc7fa2e32da2eb5017c00c4320768c583f187681f (diff)
downloadopenrct2-docker-aa0e601318eddc65669681493b4e9bf5a176ed4c.tar.gz
openrct2-docker-aa0e601318eddc65669681493b4e9bf5a176ed4c.zip
Add dockerfiles for 0.1.2 and develop
Diffstat (limited to '0.1.2/cli/Dockerfile')
-rw-r--r--0.1.2/cli/Dockerfile39
1 files changed, 39 insertions, 0 deletions
diff --git a/0.1.2/cli/Dockerfile b/0.1.2/cli/Dockerfile
new file mode 100644
index 0000000..0a17b46
--- /dev/null
+++ b/0.1.2/cli/Dockerfile
@@ -0,0 +1,39 @@
+# Build OpenRCT2
+FROM ubuntu:18.04 AS build-env
+RUN apt-get update \
+ && apt-get install --no-install-recommends -y git cmake pkg-config ninja-build clang-5.0 libsdl2-dev libspeexdsp-dev libjansson-dev libcurl4-openssl-dev libcrypto++-dev libfontconfig1-dev libfreetype6-dev libpng-dev libzip-dev libssl-dev libicu-dev \
+ && ln -s /usr/bin/clang-5.0 /usr/bin/clang \
+ && ln -s /usr/bin/clang++-5.0 /usr/bin/clang++
+
+ENV OPENRCT2_REF v0.1.2
+WORKDIR /openrct2
+RUN git -c http.sslVerify=false clone --depth 1 -b $OPENRCT2_REF https://github.com/OpenRCT2/OpenRCT2 . \
+ && mkdir build \
+ && cd build \
+ && cmake .. -G Ninja -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/openrct2-install/usr -DCMAKE_INSTALL_LIBDIR=/openrct2-install/usr/lib \
+ && ninja -k0 install
+
+# Build runtime image
+FROM ubuntu:18.04
+RUN apt-get update
+RUN apt-get -y upgrade
+RUN apt-get install --no-install-recommends -y rsync ca-certificates libjansson4 libpng16-16 libzip4 libcurl4 libfreetype6 libfontconfig1
+
+# Install OpenRCT2
+COPY --from=build-env /openrct2-install /openrct2-install
+RUN rsync -a /openrct2-install/* / \
+ && rm -rf /openrct2-install \
+ && openrct2-cli --version
+
+# Set up ordinary user
+RUN useradd -m openrct2
+USER openrct2
+WORKDIR /home/openrct2
+EXPOSE 11753
+
+# Test run and scan
+RUN openrct2-cli --version \
+ && openrct2-cli scan-objects
+
+# Done
+ENTRYPOINT ["openrct2-cli"]