feat: Add server Dockerfile (#2)

## Description

**What(what issue does this code solve/what feature does it add):**

We are adding the `Dockerfile` with all the scripts and programs to run
our games in.

**How(how does it solve it):**

1. Add `serverDockerfile` which contains all the docker code.
2. Add `.scripts` folder where we will store all the scripts; for
example in our case, where proton installation script will reside.

## Required Checklist:

- [ ] I have added any necessary documentation and comments in my code
(where appropriate)
- [ ] I have added tests to make sure my code runs in all contexts

## Further comments
This commit is contained in:
Wanjohi
2024-03-29 10:03:31 +03:00
committed by GitHub
parent 7d5d8be14b
commit c4f5e2296c
3 changed files with 487 additions and 0 deletions

36
server.Dockerfile Normal file
View File

@@ -0,0 +1,36 @@
#This contains all the necessary libs for the server to work.
#NOTE: KEEP THIS IMAGE AS LEAN AS POSSIBLE.
FROM ubuntu:latest
#FIXME: install Vulkan drivers (should be done in the .scripts/gpu)
#FIXME: install https://git.dec05eba.com/gpu-screen-recorder (should be done in the .scripts/stream)
ENV DEBIAN_FRONTEND=noninteractive \
TIMEZONE=Africa/Nairobi
#Install base libs
RUN apt update && \
dpkg --add-architecture i386 && \
apt install -y \
software-properties-common \
curl \
wget \
git \
jq \
locales \
&& rm -rf /var/lib/apt/lists/* \
&& locale-gen en_US.UTF-8
#Set language variables
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
COPY .scripts/ /usr/bin/netris/
RUN ls -la /usr/bin/netris \
&& chmod +x /usr/bin/netris/proton
#Install proton
RUN /usr/bin/netris/proton -i