Skip to content

Instantly share code, notes, and snippets.

@Apurer
Created July 30, 2024 21:01
Show Gist options
  • Save Apurer/b13a2174a573edc3751e95f7395b149d to your computer and use it in GitHub Desktop.
Save Apurer/b13a2174a573edc3751e95f7395b149d to your computer and use it in GitHub Desktop.
# Use the official emscripten image
FROM emscripten/emsdk:latest
# Install necessary packages
RUN apt-get update && apt-get install -y \
git \
build-essential \
cmake \
python3 \
&& rm -rf /var/lib/apt/lists/*
# Clone the DOOM repository
RUN git clone https://github.com/id-Software/DOOM.git /DOOM
# Set the working directory
WORKDIR /DOOM/linuxdoom-1.10
# Build DOOM using Emscripten
RUN emcmake cmake .
RUN emmake make
# Serve the built files using a simple HTTP server
CMD ["emrun", "--no_browser", "--port", "8080", "."]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment