mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-02 03:46:20 +02:00
firefox combine arm with amd64.
This commit is contained in:
parent
3780bff07d
commit
a377f0f9f2
3 changed files with 33 additions and 43 deletions
1
.github/workflows/ghcr_arm.yml
vendored
1
.github/workflows/ghcr_arm.yml
vendored
|
@ -24,7 +24,6 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: firefox
|
- name: firefox
|
||||||
dockerfile: Dockerfile.arm
|
|
||||||
- name: chromium
|
- name: chromium
|
||||||
- name: vlc
|
- name: vlc
|
||||||
- name: xfce
|
- name: xfce
|
||||||
|
|
|
@ -1,27 +1,48 @@
|
||||||
ARG BASE_IMAGE=m1k1o/neko:base
|
ARG BASE_IMAGE=m1k1o/neko:base
|
||||||
FROM $BASE_IMAGE
|
FROM $BASE_IMAGE
|
||||||
|
|
||||||
ARG SRC_URL="https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# install firefox
|
# install firefox
|
||||||
RUN set -eux; apt-get update; \
|
RUN set -eux; apt-get update; \
|
||||||
apt-get install -y --no-install-recommends openbox \
|
apt-get install -y --no-install-recommends openbox; \
|
||||||
xz-utils libgtk-3-0 libdbus-glib-1-2; \
|
ARCH=$(dpkg --print-architecture); \
|
||||||
#
|
if [ "${ARCH}" = "armhf" ]; then \
|
||||||
# fetch latest release
|
#
|
||||||
wget -O /tmp/firefox-setup.tar.xz "${SRC_URL}"; \
|
# install firefox-esr for armhf
|
||||||
mkdir /usr/lib/firefox; \
|
apt-get install -y --no-install-recommends openbox firefox-esr; \
|
||||||
tar -xvf /tmp/firefox-setup.tar.xz -C /usr/lib; \
|
ln -s /usr/bin/firefox-esr /usr/bin/firefox; \
|
||||||
rm -f /tmp/firefox-setup.tar.xz; \
|
#
|
||||||
ln -s /usr/lib/firefox/firefox /usr/bin/firefox; \
|
# install extensions
|
||||||
|
mkdir -p /usr/lib/firefox-esr/distribution/extensions; \
|
||||||
|
wget -O '/usr/lib/firefox-esr/distribution/extensions/uBlock0@raymondhill.net.xpi' https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi; \
|
||||||
|
wget -O '/usr/lib/firefox-esr/distribution/extensions/sponsorBlocker@ajay.app.xpi' https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi; \
|
||||||
|
else \
|
||||||
|
#
|
||||||
|
# fetch latest release (for x86_64 and arm64)
|
||||||
|
if [ "${ARCH}" = "x86_64" ]; then \
|
||||||
|
SRC_URL="https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US"; \
|
||||||
|
elif [ "${ARCH}" = "arm64" ]; then \
|
||||||
|
SRC_URL="https://download.mozilla.org/?product=firefox-latest&os=linux-aarch64&lang=en-US"; \
|
||||||
|
fi; \
|
||||||
|
if [ ! -z "${SRC_URL}" ]; then \
|
||||||
|
apt-get install -y --no-install-recommends xz-utils libgtk-3-0 libdbus-glib-1-2; \
|
||||||
|
wget -O /tmp/firefox-setup.tar.xz "${SRC_URL}"; \
|
||||||
|
mkdir /usr/lib/firefox; \
|
||||||
|
tar -xvf /tmp/firefox-setup.tar.xz -C /usr/lib; \
|
||||||
|
rm -f /tmp/firefox-setup.tar.xz; \
|
||||||
|
ln -s /usr/lib/firefox/firefox /usr/bin/firefox; \
|
||||||
|
apt-get --purge autoremove -y xz-utils; \
|
||||||
|
else \
|
||||||
|
echo "Unsupported architecture: ${ARCH}"; \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
#
|
#
|
||||||
# create a profile directory
|
# create a profile directory
|
||||||
mkdir -p /home/neko/.mozilla/firefox/profile.default/extensions; \
|
mkdir -p /home/neko/.mozilla/firefox/profile.default/extensions; \
|
||||||
chown -R neko:neko /home/neko/.mozilla/firefox/profile.default; \
|
chown -R neko:neko /home/neko/.mozilla/firefox/profile.default; \
|
||||||
#
|
#
|
||||||
# clean up
|
# clean up
|
||||||
apt-get --purge autoremove -y xz-utils; \
|
|
||||||
apt-get clean -y; \
|
apt-get clean -y; \
|
||||||
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
||||||
|
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
ARG BASE_IMAGE=m1k1o/neko:arm-base
|
|
||||||
FROM $BASE_IMAGE
|
|
||||||
|
|
||||||
#
|
|
||||||
# install firefox-esr
|
|
||||||
RUN set -eux; apt-get update; \
|
|
||||||
# TODO: Bring back DRM support with arm32v7/debian:buster-slim image.
|
|
||||||
apt-get install -y --no-install-recommends openbox firefox-esr; \
|
|
||||||
#
|
|
||||||
# install extensions
|
|
||||||
mkdir -p /usr/lib/firefox-esr/distribution/extensions; \
|
|
||||||
wget -O '/usr/lib/firefox-esr/distribution/extensions/uBlock0@raymondhill.net.xpi' https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi; \
|
|
||||||
wget -O '/usr/lib/firefox-esr/distribution/extensions/sponsorBlocker@ajay.app.xpi' https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi; \
|
|
||||||
#
|
|
||||||
# create a profile directory
|
|
||||||
mkdir -p /home/neko/.mozilla/firefox/profile.default/extensions; \
|
|
||||||
chown -R neko:neko /home/neko/.mozilla/firefox/profile.default; \
|
|
||||||
#
|
|
||||||
# clean up
|
|
||||||
apt-get clean -y; \
|
|
||||||
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
|
||||||
|
|
||||||
#
|
|
||||||
# copy configuation files
|
|
||||||
COPY supervisord.conf /etc/neko/supervisord/firefox.conf
|
|
||||||
COPY neko.js /usr/lib/firefox-esr/mozilla.cfg
|
|
||||||
COPY autoconfig.js /usr/lib/firefox-esr/defaults/pref/autoconfig.js
|
|
||||||
COPY policies.json /usr/lib/firefox-esr/distribution/policies.json
|
|
||||||
COPY --chown=neko profiles.ini /home/neko/.mozilla/firefox/profiles.ini
|
|
||||||
COPY openbox.xml /etc/neko/openbox.xml
|
|
Loading…
Add table
Reference in a new issue