summaryrefslogtreecommitdiffhomepage
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
parentc7fa2e32da2eb5017c00c4320768c583f187681f (diff)
downloadopenrct2-docker-aa0e601318eddc65669681493b4e9bf5a176ed4c.tar.gz
openrct2-docker-aa0e601318eddc65669681493b4e9bf5a176ed4c.zip
Add dockerfiles for 0.1.2 and develop
-rw-r--r--0.1.2/cli/Dockerfile39
-rw-r--r--README.md37
-rw-r--r--develop/cli/Dockerfile39
3 files changed, 113 insertions, 2 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"]
diff --git a/README.md b/README.md
index 122d9fa..5edd9bc 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,35 @@
-# openrct2-docker
-Public dockerfiles for OpenRCT2
+# OpenRCT2
+
+An open-source re-implementation of RollerCoaster Tycoon 2. A construction and management simulation video game that simulates amusement park management.
+
+This repository contains `Dockerfile` definitions for the command line version OpenRCT2. These images should be used for hosting multiplayer servers or executing commands such as generating screenshots.
+
+You can pull and test the latest develop version by running:
+```
+$ docker run --rm openrct2/openrct2-cli:develop --version
+```
+
+## Multiplayer
+
+To host a multiplayer server, create a container that exposes the desired port and pass in a URL to the park to load. For example:
+
+```
+$ docker run --rm -p 11753:11753 -it openrct2/openrct2-cli host https://bit.do/openrct2-bpb
+```
+
+All configuraion data is stored inside the container. If you want to persit it outside the container, you can mount it to a volume or your local filesystem. Mounting your local filesystem also allows you to read and write saved games locally. For example:
+
+```
+$ docker run --rm -p 11753:11753 -v /home/me/openrct2-config:/home/openrct2/.config/OpenRCT2 -it openrct2/openrct2-cli host /home/openrct2/.config/OpenRCT2/save/mypark.sv6
+```
+
+The command above will mount the OpenRCT2 user / config directory inside the container to a directory on your local filesystem. This will allow you to persist and edit the configuration, saved games etc. locally.
+
+It will then host a new server and load the saved game `mypark.sv6` located in the mounted directory under the save sub-directory.
+
+## Tags
+
+Currently all tags are based on Ubuntu 18.04 (amd64).
+
+- [`0.1.2`, `latest` (*0.1.2/cli/Dockerfile*)](https://github.com/OpenRCT2/openrct2-docker/blob/master/0.1.2/cli/Dockerfile)
+- [`develop` (*develop/cli/Dockerfile*)](https://github.com/OpenRCT2/openrct2-docker/blob/master/0.1.2/cli/Dockerfile)
diff --git a/develop/cli/Dockerfile b/develop/cli/Dockerfile
new file mode 100644
index 0000000..7b3ee74
--- /dev/null
+++ b/develop/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 develop
+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"]