Skip to content

Commit

Permalink
Use packaged geckodriver from @testing
Browse files Browse the repository at this point in the history
  • Loading branch information
bbusse committed Jun 28, 2023
1 parent 69de222 commit c6c798d
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
ARG SWAYVNC_VERSION=latest
ARG GECKODRIVER_VERSION=0.31.0
FROM ghcr.io/bbusse/swayvnc:${SWAYVNC_VERSION}
LABEL maintainer="Björn Busse <[email protected]>"
LABEL org.opencontainers.image.source https://github.com/bbusse/swayvnc-firefox

ARG GECKODRIVER_VERSION

ENV ARCH="x86_64" \
USER="firefox-user" \
APK_ADD="libc-dev libffi-dev libxkbcommon-dev gcc git python3 python3-dev py3-pip py3-wheel firefox" \
APK_ADD="libc-dev libffi-dev libxkbcommon-dev gcc geckodriver@testing git python3 python3-dev py3-pip py3-wheel firefox" \
APK_DEL=""

USER root

# Add application user and application
# Cleanup: Remove files and users
RUN addgroup -S $USER && adduser -S $USER -G $USER \
&& echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/11768
&& sed -i -e 's/https/http/' /etc/apk/repositories \
# Add packages
Expand All @@ -27,21 +25,15 @@ RUN addgroup -S $USER && adduser -S $USER -G $USER \
/usr/includes/* \
/var/cache/apk/* \

# Get geckodriver
&& wget https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz \
&& tar -xzf geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz -C /usr/bin \
&& rm geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz \
&& geckodriver --version \

# Add latest webdriver-util script for firefox automation
&& wget -P /usr/local/bin https://raw.githubusercontent.com/bbusse/webdriver-util/main/webdriver_util.py \
&& chmod +x /usr/local/bin/webdriver_util.py \
&& wget -O /tmp/requirements_webdriver.txt https://raw.githubusercontent.com/bbusse/webdriver-util/main/requirements.txt \

# Add stream-controller for stream handling
&& wget -P /usr/local/bin https://raw.githubusercontent.com/bbusse/stream-controller/main/controller.py \
# Add iss-display-controller for view handling
&& wget -P /usr/local/bin https://raw.githubusercontent.com/OpsBoost/iss-display-controller/dev/controller.py \
&& chmod +x /usr/local/bin/controller.py \
&& wget -O /tmp/requirements_controller.txt https://raw.githubusercontent.com/bbusse/stream-controller/main/requirements.txt \
&& wget -O /tmp/requirements_controller.txt https://raw.githubusercontent.com/OpsBoost/iss-display-controller/dev/requirements.txt \

# Run controller.py
&& echo "exec controller.py --stream-source=vnc-browser --debug=$DEBUG" >> /etc/sway/config.d/firefox
Expand Down

0 comments on commit c6c798d

Please sign in to comment.