Created
August 23, 2017 21:45
-
-
Save denysvitali/15263636f0c3c720860a72de3360fa79 to your computer and use it in GitHub Desktop.
Minecraft in a sandbox
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
# Based on jessfraz work | |
# This is not an official version of Minecraft - use at your own risk | |
# | |
# Before you ask: I don't particularly like this game, and haven't played it in a while. | |
# It was just a challenge with myself to run a "sandboxed" game and see the result. | |
FROM debian:sid | |
ADD http://dl.hackphoenix.com/download/launcher/minecraft/MCLauncher_Linux /src/MCLauncher.zip | |
# Install packages | |
RUN apt-get update && apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg \ | |
zsh \ | |
unzip \ | |
hicolor-icon-theme \ | |
libgl1-mesa-dri \ | |
libgl1-mesa-glx \ | |
libpango1.0-0 \ | |
libpulse0 \ | |
libv4l-0 \ | |
fonts-symbola \ | |
openjdk-8-jre \ | |
--no-install-recommends | |
# OpenGL and such | |
RUN apt-get install -y \ | |
libgl1-mesa-dev \ | |
freeglut3-dev \ | |
mesa-utils \ | |
x11-xserver-utils \ | |
--no-install-recommends | |
# Add user | |
RUN groupadd -r unpriv && useradd -r -g unpriv -G audio,video unpriv \ | |
&& chown -R unpriv:unpriv /home/unpriv | |
RUN cd /src/; unzip MCLauncher.zip | |
RUN chown -R unpriv:unpriv /src | |
RUN chmod 755 /src/MCLauncher_64bit | |
RUN rm /src/MCLauncher.zip | |
# Run as unprivileged | |
#USER unpriv | |
ENTRYPOINT [ "/src/MCLauncher_64bit" ] |
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
#!/bin/bash | |
# Build the image | |
docker build -t someuser/minecraft:latest . | |
# Run in with GPU passtrough - check out https://github.com/mviereck/x11docker | |
x11docker -g -p someuser/minecraft |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment