Skip to content

Commit

Permalink
ALPINE-DOOM
Browse files Browse the repository at this point in the history
  • Loading branch information
B0nam committed Apr 3, 2024
1 parent 1257ceb commit dad63dc
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build and Deploy
run-name: Build and deploy docker images on dockerhub

on: [push]
jobs:
build_job:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Autenticate with Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build alpine-doom image
run: docker build -t alpine-doom:latest Docker/.

- name: Push alpine-doom image
run: |
docker tag alpine-doom:latest "${{ secrets.DOCKERHUB_USERNAME }}/alpine-novnc:latest"
docker push "${{ secrets.DOCKERHUB_USERNAME }}/alpine-doom:latest"
39 changes: 39 additions & 0 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# USE ALPINE AS BASE IMAGE
FROM b0nam/alpine-novnc:base

# INSTALL DEPENDENCIES
RUN apk add \
build-base \
gcc \
make \
sdl2-dev \
sdl2_net-dev \
sdl2_mixer-dev \
py-pillow \
automake \
autoconf \
libtool \
pkgconfig

# CLONE CRISPY-DOOM REPOSITORY
RUN git clone https://github.com/fabiangreffrath/crispy-doom.git

# DEFINE WORK DIRECTORY
WORKDIR /crispy-doom

# RUN COMPILATION COMMANDS
RUN autoreconf -fiv && \
./configure && \
make && \
make install

# GET DOOM1 WAD FILE
RUN wget -O doom-wad-shareware.tar.gz http://ftp.debian.org/debian/pool/non-free/d/doom-wad-shareware/doom-wad-shareware_1.9.fixed.orig.tar.gz && \
tar -xzvf doom-wad-shareware.tar.gz -C /crispy-doom && \
mv /crispy-doom/doom-wad-shareware-1.9.fixed/doom1.wad /crispy-doom && \
rm -rf /crispy-doom/doom-wad-shareware-1.9.fixed && \
rm doom-wad-shareware.tar.gz

ADD . /app

EXPOSE 8080
25 changes: 25 additions & 0 deletions Docker/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[supervisord]
nodaemon=true

; START XVFB DISPLAY SERVER
[program:xvfb]
command=Xvfb :0 -screen 0 "%(ENV_DISPLAY_WIDTH)s"x"%(ENV_DISPLAY_HEIGHT)s"x24 -listen tcp -ac
autorestart=false

; START X11VNC SERVER
[program:x11vnc]
command=x11vnc -display :0 -forever -shared -passwd "%(ENV_X11_PASSWORD)s"
autorestart=true
depends_on=fluxbox

; START NOVNC SERVER TO ALLOW CONNECTIONS OVER THE BROWSER
[program:novnc]
command=novnc_server --vnc localhost:5900 --listen 8080
autorestart=true
depends_on=x11vnc

; START CRISPY DOOM
[program:doom]
command=../crispy-doom/src/crispy-doom -wad doom1.wad -vnc
autorestart=true
depends_on=novnc

0 comments on commit dad63dc

Please sign in to comment.