1
0
Fork 0

Initial commit

master
PHENOM 2020-01-12 16:13:16 +01:00
commit d5cb6c0367
4 changed files with 83 additions and 0 deletions

24
Dockerfile 100644
View File

@ -0,0 +1,24 @@
FROM ubuntu:bionic
ENV DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:xapienz/curl34 && \
apt-get update && \
apt-get install -y net-tools tar unzip curl ca-certificates openssl git sqlite fontconfig tzdata iproute2 xz-utils gnupg2 xvfb && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
curl -s https://dl.winehq.org/wine-builds/winehq.key | apt-key add - && \
apt-add-repository -y 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' && \
apt-get install -y wine-staging=4.10~bionic wine-staging-i386=4.10~bionic wine-staging-amd64=4.10~bionic winetricks && \
rm -rf /var/lib/apt/lists/* && \
useradd -d /home/container -m container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]

5
README.md 100644
View File

@ -0,0 +1,5 @@
# Pterodactly Egg Empyrion
## Instructions
* Build the Docker Image with `docker build -t empyrion:latest .`
* Import the egg-empyrion.json to Pterodactyl

26
egg-empyrion.json 100644
View File

@ -0,0 +1,26 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v1"
},
"exported_at": "2020-01-12T16:06:22+01:00",
"name": "Empyrion",
"author": "thephenom1811@gmail.com",
"description": "Empyrion Dedicated Server with Wine",
"image": "empyrion:latest",
"startup": ".\/EmpyrionDedicated.exe -batchmode -logFile Logs\/current.log",
"config": {
"files": "{}",
"startup": "{\r\n \"done\": \"New playfield server\",\r\n \"userInteraction\": []\r\n}",
"logs": "{\r\n \"custom\": true,\r\n \"location\": \"logs\/latest.log\"\r\n}",
"stop": "^C"
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\napt update\r\napt -y --no-install-recommends install curl unzip lib32gcc1 ca-certificates\r\ncd \/tmp\r\ncurl -sSL -o steamcmd.tar.gz http:\/\/media.steampowered.com\/installer\/steamcmd_linux.tar.gz\r\n\r\nmkdir -p \/mnt\/server\/steam\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steam\r\ncd \/mnt\/server\/steam\r\nchown -R root:root \/mnt\r\n\r\nexport HOME=\/mnt\/server\r\n.\/steamcmd.sh +login anonymous +force_install_dir \/mnt\/server +app_update 530870 +quit\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v \/mnt\/server\/steam\/linux32\/steamclient.so \/mnt\/server\/.steam\/sdk32\/steamclient.so",
"container": "ubuntu:16.04",
"entrypoint": "bash"
}
},
"variables": []
}

28
entrypoint.sh 100644
View File

@ -0,0 +1,28 @@
#!/bin/bash
set -e
GAMEDIR="${HOME}/DedicatedServer"
# Make internal Docker IP address available to processes.
export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'`
cd "${HOME}/steam"
./steamcmd.sh +login anonymous +force_install_dir ${HOME} +app_update 530870 +quit
mkdir -p "${GAMEDIR}/Logs"
Xvfb :1 -screen 0 800x600x24 &
export WINEDLLOVERRIDES="mscoree,mshtml="
export DISPLAY=:1
cd "${GAMEDIR}"
sh -c 'until [ "`netstat -ntl | tail -n+3`" ]; do sleep 1; done
sleep 5 # gotta wait for it to open a logfile
tail -F Logs/current.log ../Logs/*/*.log ../wine.log' &
# Replace Startup Variables
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
echo ":${GAMEDIR}$ /opt/wine-staging/bin/wine ${MODIFIED_STARTUP} &> ${HOME}/wine.log"
# Run the Server
eval /opt/wine-staging/bin/wine ${MODIFIED_STARTUP} &> ${HOME}/wine.log