Archived
2
0

Merge pull request #40 from mbattista/arm-dockerfiles

ARM container do need their own Dockerfile
This commit is contained in:
Miroslav Šedivý 2021-04-03 14:58:41 +02:00 committed by GitHub
commit 5805cbdda5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 50 additions and 3 deletions

View File

@ -43,7 +43,7 @@ build() {
# build base # build base
docker build -t "${BUILD_IMAGE}:base" -f base/Dockerfile "${BASE}" docker build -t "${BUILD_IMAGE}:base" -f base/Dockerfile "${BASE}"
else else
# buld image # build image
docker build -t "${BUILD_IMAGE}:$1" --build-arg="BASE_IMAGE=${BUILD_IMAGE}:base" -f "$1/Dockerfile" "$1/" docker build -t "${BUILD_IMAGE}:$1" --build-arg="BASE_IMAGE=${BUILD_IMAGE}:base" -f "$1/Dockerfile" "$1/"
fi fi
} }
@ -52,9 +52,13 @@ build_arm() {
if [ "$1" = "base" ] if [ "$1" = "base" ]
then then
# build ARM base # build ARM base
docker build -t "${BUILD_IMAGE}:arm-base" -f arm-base/Dockerfile "${BASE}" docker build -t "${BUILD_IMAGE}:arm-base" -f base/Dockerfile.arm "${BASE}"
elif [ -f "$1/Dockerfile.arm" ]
then
# build dedicated ARM image
docker build -t "${BUILD_IMAGE}:arm-$1" --build-arg="BASE_IMAGE=${BUILD_IMAGE}:arm-base" -f "$1/Dockerfile.arm" "$1/"
else else
# buld ARM image # try to build ARM image with common Dockerfile
docker build -t "${BUILD_IMAGE}:arm-$1" --build-arg="BASE_IMAGE=${BUILD_IMAGE}:arm-base" -f "$1/Dockerfile" "$1/" docker build -t "${BUILD_IMAGE}:arm-$1" --build-arg="BASE_IMAGE=${BUILD_IMAGE}:arm-base" -f "$1/Dockerfile" "$1/"
fi fi
} }

View File

@ -0,0 +1,19 @@
ARG BASE_IMAGE=m1k1o/neko:arm-base
FROM $BASE_IMAGE
#
# install neko chromium
RUN set -eux; apt-get update; \
apt-get install -y --no-install-recommends chromium-browser openbox libwidevinecdm0; \
ln -s /usr/bin/chromium-browser /usr/bin/chromium; \
#
# clean up
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
#
# copy configuation files
COPY supervisord.conf /etc/neko/supervisord/chromium.conf
COPY --chown=neko preferences.json /home/neko/.config/chromium/Default/Preferences
COPY policies.json /etc/chromium/policies/managed/policies.json
COPY openbox.xml /etc/neko/openbox.xml

View File

@ -0,0 +1,24 @@
ARG BASE_IMAGE=m1k1o/neko:arm-base
FROM $BASE_IMAGE
#
# install firefox-esr
RUN set -eux; apt-get update; \
apt-get install -y --no-install-recommends openbox firefox-esr libwidevinecdm0; \
#
# 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/nordvpnproxy@nordvpn.com.xpi https://addons.mozilla.org/firefox/downloads/latest/nordvpn-proxy-extension/latest.xpi; \
#
# 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 openbox.xml /etc/neko/openbox.xml