Add crispy-doom

main
Jerry Aldrich 3 years ago
parent e3357140bc
commit f7e2f71a42
  1. 58
      README.md
  2. 28
      crispy-doom/Dockerfile
  3. 53
      crispy-doom/README.md
  4. 21
      crispy-doom/entrypoint.sh
  5. 3
      failed_attempts/README.md
  6. 18
      failed_attempts/chocolate-doom/Dockerfile
  7. 7
      failed_attempts/chocolate-doom/README.md
  8. 39
      failed_attempts/odamex/Dockerfile
  9. 6
      failed_attempts/odamex/README.md
  10. 16
      failed_attempts/odamex/build_odamex.sh
  11. 2
      failed_attempts/odamex/odasrv.cfg
  12. 0
      zandronum/Dockerfile
  13. 0
      zandronum/entrypoint.sh
  14. 0
      zandronum/extract_libs.sh
  15. 0
      zandronum/server.cfg

@ -1,55 +1,7 @@
# Docker Doom Server
# Doom Server
## Usage
## Project Layout
```text
docker run --rm -it \
-e IWAD_URL=https://files.jerryaldrichiii.com/public/doom2.wad \
-e RETRO_MODE=true \
-e ITEM_RESPAWN=true \
-e SV_HOSTNAME=doom.yourdomain.com \
-p 10666:10666/udp \
jerryaldrichiii/doom-server
```
### Configurables (set via ENV)
- IWAD_URL=https://files.jerryaldrichiii/public/doom2.wad - Specify IWAD :
- RETRO_MODE=true - Enable my idea of retro doom. It does the following:
- Disables jumping
- Disables mouse look
- Disables crouching
- Disables altering FOV
- Disables crosshairs
- Enables forced weapon switching on pickup
- ITEM_RESPAWN=true - Enable item (including weapons) respawning
## Connecting
### Locally (For testing)
- Download Zandronum: [https://zandronum.com/download](https://zandronum.com/download)
- Download the same Doom IWAD that is on the server (Set via IWAD_URL env var)
- `wget https://files.jerryaldrichiii.com/public/freedm.wad`
- Connect to the server:
- `zandronum -iwad /path/to/freedm.wad -connect localhost`
### FreeDM - doom.jerryaldrichiii.com
- Download Zandronum: [https://zandronum.com/download](https://zandronum.com/download)
- Download the same Doom IWAD that is on the server:
- `wget https://files.jerryaldrichiii.com/public/freedm.wad`
- Connect to the server:
- `zandronum -iwad /path/to/freedm.wad -connect doom.jerryaldrichiii.com`
### Doom 2 (Shareware) - doom.jerryaldrichiii.com
- Download Zandronum: [https://zandronum.com/download](https://zandronum.com/download)
- Download the same Doom IWAD that is on the server
- `wget https://files.jerryaldrichiii.com/public/doom2.wad`
- Connect to the server:
- `zandronum -iwad /path/to/doom2.wad -connect doom.jerryaldrichiii.com:10667`
## Notes
See WIP/ for other nearly finished attempts of other servers
Different flavors of DOOM can be found in their respective folders. Only
crispy-doom and zandronum are currently functioning. See the README.md in those
folders for more info.

@ -0,0 +1,28 @@
FROM alpine as build
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
RUN apk --no-cache add autoconf automake gcc git make musl-dev sdl2-dev sdl2_mixer-dev sdl2_net-dev
WORKDIR /src/
ARG VERSION=5.11.1
RUN git clone -b crispy-doom-${VERSION} --depth 1 https://github.com/fabiangreffrath/crispy-doom
RUN cd crispy-doom && ./autogen.sh && make
FROM alpine
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
RUN apk --no-cache add sdl2 sdl2_mixer sdl2_net tini
EXPOSE 2342/udp
COPY --from=build /src/crispy-doom/src/crispy-server /usr/local/bin/crispy-server
RUN adduser -D doom
USER doom
COPY ./entrypoint.sh .
# Using tini here because the crispy-doom process does not respect signals
ENTRYPOINT ["tini", "--", "/entrypoint.sh"]

@ -0,0 +1,53 @@
# Doom Server (Crispy Doom)
## Usage
```text
docker run --rm -it \
-e DOOM_SERVER_NAME=doom.yourdomain.com \
-p 2342:2342/udp \
jerryaldrichiii/doom-server-crispy:latest
```
## Environment Variables
### `DOOM_SERVER_PORT`
The UDP port for the server to listen on.
### `DOOM_SERVER_PUBLIC`
If set to `true`, then it will register the server with
[master.chocolate-doom.org](https://master.chocolate-doom.org)
### `DOOM_SERVER_NAME`
If `DOOM_SERVER_PUBLIC="true"` then the value of this variable will be used for
the server name on [master.chocolate-doom.org](https://master.chocolate-doom.org).
## Connecting
First, download [Crispy Doom](http://latest.chocolate-doom.org/)
Then, if you are the first player (the host), connect using the following:
```
crispy-doom -iwad ~/path/to/your/IWAD -connect DOCKER_HOST_IP -deathmatch -nomonsters
```
Or, if you are joining a game, connect using the following:
```
crispy-doom -iwad ~/path/to/same/IWAD/as/host -connect DOCKER_HOST_IP
```
### NOTES
Some things to keep in mind about using this server:
- The first person connecting "configures" the server (e.g. `-nomonsters`, `-iwad`, etc)
- All players must end their game for another player to join
- There is a max of 8 players
## More Info
See: [https://www.chocolate-doom.org/wiki/index.php/Multiplayer](https://www.chocolate-doom.org/wiki/index.php/Multiplayer)

@ -0,0 +1,21 @@
#!/bin/sh
if [ "$DOOM_SERVER_PUBLIC" = "true" ]; then
DOOM_SERVER_PUBLIC="-server"
else
DOOM_SERVER_PUBLIC="-privateserver"
fi
if [ -n "$DOOM_SERVER_NAME" ]; then
DOOM_SERVER_NAME="-servername ${DOOM_SERVER_NAME}"
else
DOOM_SERVER_NAME=""
fi
set -eux
crispy-server \
-port "${DOOM_SERVER_PORT:-2342}" \
${DOOM_SERVER_PUBLIC} \
"${DOOM_SERVER_NAME}"

@ -1,3 +0,0 @@
# Failed Attempts
Failed attempts at getting various other servers running

@ -1,18 +0,0 @@
FROM debian:stable-slim
RUN apt-get update -y && apt-get install -y chocolate-doom
RUN apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/{apt,dpkg,cache,log}/
RUN mkdir -p /export/libs
COPY extract_server.sh /
RUN bash /extract_server.sh /usr/games/chocolate-server /export/libs
FROM debian:stable-slim
COPY --from=0 /export /srv
EXPOSE 10666/udp
CMD LD_LIBRARY_PATH=/srv/libs /srv/chocolate-server -privateserver -port 10666

@ -1,7 +0,0 @@
# Chocolate Doom
Chocolate Doom is neat for it's retro appeal, but it doesn't really work
outside of a LAN party imo. I eventually went with Zandronum due to it's Linux
support and modern online play capabilities.
If you want to build this make sure you copy in extract_server.sh from above.

@ -1,39 +0,0 @@
# Switch to alpine to serve content built above
FROM ubuntu:latest
RUN apt-get update -y
RUN apt-get install -y cmake wget g++ unzip
RUN mkdir /src
WORKDIR /src
RUN wget https://github.com/odamex/odamex/archive/0.8.1.tar.gz
RUN tar xvzf *.tar.gz
COPY build_odamex.sh /build_odamex.sh
RUN /build_odamex.sh
RUN wget https://github.com/freedoom/freedoom/releases/download/v0.12.1/freedm-0.12.1.zip
RUN unzip freedm*.zip
RUN cp freedm*/freedm.wad /export
# Using debian slim as opposed to alpine because
# odamex uses libraries only available in glibc
FROM debian:stable-slim
COPY --from=0 /export/odasrv /srv/odasrv
COPY --from=0 /export/odamex.wad /srv/odamex.wad
COPY --from=0 /export/freedm.wad /srv/freedm.wad
COPY odasrv.cfg /srv/odasrv.cfg
# RUN useradd --no-create-home --shell /bin/false odamex
RUN useradd -m --shell /bin/false odamex
RUN chown -R odamex:odamex /srv/
USER odamex
CMD /srv/odasrv -config /srv/odasrv.cfg
EXPOSE 10666/udp

@ -1,6 +0,0 @@
# Docker Odamex
You can use this to build a Odamex Doom server.
I put a lot of work into this, but ultimately went with Zandronum due to it's
compatibility with Linux. I couldn't get audio working with Odamex :(

@ -1,16 +0,0 @@
#!/bin/sh
set -e
cd /src/odamex*
mkdir /export
cp odamex.wad /export
mkdir build
cd build && cmake .. -DCMAKE_BUILD_TYPE=MinSizRel -DBUILD_CLIENT=0 -DBUILD_ODALAUNCH=0
make odasrv
cp server/odasrv /export
Loading…
Cancel
Save