Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into add-warp-server
Browse files Browse the repository at this point in the history
  • Loading branch information
wanjohiryan authored Oct 13, 2023
2 parents 10c4b29 + e9f981b commit 471efce
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
path: ./

- name: Build and push image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./
file: docker/base/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
path: ./
-
name: Build Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./
file: docker/base/Dockerfile
Expand Down
2 changes: 2 additions & 0 deletions CHECKLIST-B4-RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
- [ ] Add warp client and hook it up to ffmpeg
- [ ] Steam container as a sidecar
- [ ] Input inside base container
- [ ] Add gamepad support
- [ ] Add mouse and keyboard support
- [ ] Launch a test run on AWS:
- [x] Test ffmpeg, xserver and pulseaudio
- [ ] Test warp
34 changes: 27 additions & 7 deletions docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
# $ sudo chmod 777 ./certs
# $ docker run --runtime=sysbox-runc -it --rm --device=/dev/uinput --device=/dev/dri -v ./certs:/certs --name=arc3dia ghcr.io/wanjohiryan/arc3dia:base
#
# This will run systemd, sshd and docker;
# https://github.com/nestybox/dockerfiles/blob/master/ubuntu-jammy-systemd/Dockerfile
# FROM ghcr.io/wanjohiryan/ffmpeg/v6:nightly
# This will run systemd, sshd and docker;
#https://github.com/nestybox/dockerfiles/blob/master/ubuntu-jammy-systemd/Dockerfile
FROM ubuntu:jammy

#
# For selkies
ARG UBUNTU_RELEASE=22.04

#
# Systemd installation
#
Expand Down Expand Up @@ -154,6 +158,21 @@ RUN apt-get update && apt-get install --no-install-recommends -y openssh-server;
mkdir /home/${USERNAME}/.ssh; \
chown $USERNAME:$USERNAME /home/${USERNAME}/.ssh

#
#Install Dan Isla's Js-interposer reference link ---> https://github.com/selkies-project/selkies-gstreamer/tree/main/addons/js-interposer
#
RUN SELKIES_VERSION=$(curl -fsSL "https://api.github.com/repos/selkies-project/selkies-gstreamer/releases/latest" | jq -r '.tag_name' | sed 's/[^0-9\.\-]*//g') ; \
curl -O -fsSL "https://github.com/selkies-project/selkies-gstreamer/releases/download/v${SELKIES_VERSION}/selkies-js-interposer-v${SELKIES_VERSION}-ubuntu${UBUNTU_RELEASE}.deb"; \
apt-get update; \
apt-get install --no-install-recommends -y "./selkies-js-interposer-v${SELKIES_VERSION}-ubuntu${UBUNTU_RELEASE}.deb"; \
rm -f "selkies-js-interposer-v${SELKIES_VERSION}-ubuntu${UBUNTU_RELEASE}.deb";\
rm -rf /var/lib/apt/lists/*

# Add configuration for Selkies-GStreamer Joystick interposer
ENV LD_PRELOAD /usr/local/lib/selkies-js-interposer/joystick_interposer.so${LD_PRELOAD:+:${LD_PRELOAD}}
ENV SDL_JOYSTICK_DEVICE /dev/input/js0


#
# Make use of stopsignal (instead of sigterm) to stop systemd containers.
#
Expand All @@ -163,8 +182,8 @@ STOPSIGNAL SIGRTMIN+3
#Copy Warp [CLIENT] linux binary and the start script into the container
#
COPY temp/warp /usr/bin/
COPY docker/base/ffmpeg.sh /scripts/
RUN chmod +x /scripts/ffmpeg.sh /usr/bin/warp
COPY docker/base/entrypoint.sh /scripts/
RUN chmod +x /scripts/entrypoint.sh /usr/bin/warp

#
#Copy the systemd.service file for starting the server
Expand All @@ -184,6 +203,7 @@ RUN ln -sf /lib/systemd/system/xserver.service \
# Warp runs on port 4443
#


#RUN ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime && echo "$TZ" | sudo tee /etc/timezone

# FIXME: Remove this
Expand All @@ -208,6 +228,6 @@ ENV WARP_SERVER_PORT "${WARP_SERVER_PORT:-4443}"
ENV WARP_SERVER_FULL_URL="${WARP_SERVER_URL}:${WARP_SERVER_PORT}"

#
# Set systemd as entrypoint.
# Run entrypoint.sh then set systemd as entrypoint.
#
ENTRYPOINT [ "/sbin/init", "--log-level=err" ]
ENTRYPOINT ["/scripts/entrypoint.sh" ]
12 changes: 12 additions & 0 deletions docker/base/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

#Create directories for selkies-js-interposer

export DISPLAY="${DISPLAY:-:0}"

# Configure joystick interposer
sudo mkdir -pm755 /dev/input
sudo touch /dev/input/{js0,js1,js2,js3}

#start systemd
source /sbin/init --log-level=err
46 changes: 0 additions & 46 deletions docker/base/ffmpeg.sh

This file was deleted.

Binary file modified temp/warp
Binary file not shown.

0 comments on commit 471efce

Please sign in to comment.