Last active
January 5, 2020 17:59
-
-
Save clifton/63c1a282f3391488fad7d7d081ed3b22 to your computer and use it in GitHub Desktop.
ue4 dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
dedicated: | |
build: ./Docker | |
user: ue4 | |
volumes: | |
- "./Publish/LinuxServer:/home/ue4/CrimsonMirror" | |
working_dir: "/home/ue4/CrimsonMirror" | |
command: "./CrimsonMirrorServer.sh" | |
ports: | |
- "7777:7777" | |
- "27015:27015" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# place in ./Docker in project folder with other resources (ie steamclient.so) / start scripts | |
FROM nvidia/opengl:1.0-glvnd-devel-ubuntu18.04 | |
# Add a sentinel label so we can easily identify all derived images, including intermediate images | |
LABEL com.clifton.ue4.sentinel="1" | |
# Disable interactive prompts during package installation | |
ENV DEBIAN_FRONTEND=noninteractive | |
# Install our build prerequisites | |
USER root | |
RUN apt-get update && apt-get install -y --no-install-recommends --no-install-suggests \ | |
build-essential \ | |
ca-certificates \ | |
curl \ | |
git \ | |
python3 \ | |
python3-pip \ | |
shared-mime-info \ | |
tzdata \ | |
unzip \ | |
xdg-user-dirs \ | |
wget \ | |
zip \ | |
&& apt-get clean autoclean \ | |
&& apt-get autoremove -y \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Since UE4 refuses to build or run as the root user under Linux, create a non-root user | |
RUN useradd --create-home --home /home/ue4 --shell /bin/bash --uid 1000 ue4 \ | |
&& usermod -a -G audio,video ue4 | |
# Install SteamCMD | |
USER ue4 | |
ENV STEAMCMDDIR /home/ue4/steamcmd | |
RUN mkdir -p ${STEAMCMDDIR} && cd ${STEAMCMDDIR} \ | |
&& wget -qO- 'https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz' | tar zxf - | |
COPY ./steamclient.so ./ | |
EXPOSE 7777 27015 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment