add Dockerfile and README

This commit is contained in:
oxmox 2024-12-16 20:14:59 +01:00
parent 4a234caee9
commit 0cb54229ed
3 changed files with 47 additions and 1 deletions

1
.dockerignore Normal file
View file

@ -0,0 +1 @@
build/

34
Dockerfile Normal file
View file

@ -0,0 +1,34 @@
# syntax=docker/dockerfile:1.5
# vim:ft=dockerfile
#
# Author: oxmox
#
# To build the image:
#
# docker build --progress plain -t doompanning:latest .
#
# To run doompanning (xhost +, so it's insecure):
#
# xhost +
# docker container run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix doompanning
#
# and for nyan cats:
#
# docker container run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --entrypoint /build/sdl_nyan_demo doompanning
FROM debian:stable as build
ENV DEBIAN_FRONTEND="noninteractive"
ENV TZ="Etc/UTC"
RUN sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list.d/debian.sources && \
apt-get update && apt-get install -y --no-install-recommends \
bash build-essential git cmake ninja-build ca-certificates \
libsdl2-dev:amd64 doom-wad-shareware
COPY . /src/
WORKDIR /build/
RUN cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/install /src/
RUN cmake --build . --target all
ENTRYPOINT [ "/build/doompanning" ]

View file

@ -1 +1,12 @@
= doompanning
# doompanning
## Requirements
gcc/clang, cmake, ninja, sdl2, doom shareware
See [Dockerfile](Dockerfile) for details.
## State
Input forwarding to the dooms is currently broken or at least in a bad state.
Was trying out something, not sure.