mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
replace modules with go plugins.
This commit is contained in:
@ -19,8 +19,11 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-get -y install --no-install-recommends \
|
||||
wget ca-certificates supervisor \
|
||||
pulseaudio dbus-x11 xserver-xorg-video-dummy xserver-xorg-input-void \
|
||||
libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx5 \
|
||||
pulseaudio dbus-x11 xserver-xorg-video-dummy \
|
||||
libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx6 \
|
||||
#
|
||||
# needed for profile upload preStop hook
|
||||
zip curl \
|
||||
#
|
||||
# file chooser handler, clipboard
|
||||
xdotool xclip \
|
||||
@ -30,9 +33,10 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
|
||||
gstreamer1.0-pulseaudio;
|
||||
|
||||
# browser dependencies
|
||||
# dev runtime dependencies
|
||||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-get -y install --no-install-recommends openbox chromium;
|
||||
&& apt-get -y install --no-install-recommends \
|
||||
xfce4 xfce4-terminal firefox-esr sudo;
|
||||
|
||||
# configure runtime
|
||||
ARG USERNAME=neko
|
||||
@ -48,8 +52,6 @@ RUN set -eux; \
|
||||
adduser $USERNAME pulse; \
|
||||
#
|
||||
# add sudo support
|
||||
apt-get update; \
|
||||
apt-get install -y sudo; \
|
||||
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME; \
|
||||
chmod 0440 /etc/sudoers.d/$USERNAME; \
|
||||
#
|
||||
@ -66,7 +68,20 @@ RUN set -eux; \
|
||||
mkdir -p /etc/neko /var/www /var/log/neko; \
|
||||
chmod 1777 /var/log/neko; \
|
||||
chown $USERNAME /var/log/neko/; \
|
||||
chown -R $USERNAME:$USERNAME /home/$USERNAME
|
||||
chown -R $USERNAME:$USERNAME /home/$USERNAME; \
|
||||
#
|
||||
# install fonts
|
||||
apt-get install -y --no-install-recommends \
|
||||
# Emojis
|
||||
fonts-noto-color-emoji \
|
||||
# Chinese fonts
|
||||
fonts-arphic-ukai fonts-arphic-uming \
|
||||
# Japanese fonts
|
||||
fonts-ipafont-mincho fonts-ipafont-gothic \
|
||||
# Korean fonts
|
||||
fonts-unfonts-core \
|
||||
# Indian fonts
|
||||
fonts-indic;
|
||||
|
||||
# copy runtime files
|
||||
COPY runtime/dbus /usr/bin/dbus
|
||||
@ -75,30 +90,20 @@ COPY runtime/supervisord.conf /etc/neko/supervisord.conf
|
||||
COPY runtime/xorg.conf /etc/neko/xorg.conf
|
||||
COPY runtime/icon-theme /home/$USERNAME/.icons/default
|
||||
|
||||
# copy browser files
|
||||
COPY runtime/browser/env_wrapper /usr/bin/env_wrapper
|
||||
# COPY runtime/browser/openbox.xml /etc/neko/openbox.xml
|
||||
COPY runtime/browser/supervisord.conf /etc/neko/supervisord/chromium.conf
|
||||
COPY runtime/browser/extension /usr/share/browser/extensions/neko
|
||||
# COPY runtime/browser/policies.json /etc/chromium/policies/managed/policies.json
|
||||
COPY --chown=$USERNAME runtime/browser/preferences.json /home/neko/.config/chromium/Default/Preferences
|
||||
|
||||
# copy dev files
|
||||
COPY dev/runtime/openbox.xml /etc/neko/openbox.xml
|
||||
COPY dev/runtime/policies.json /etc/chromium/policies/managed/policies.json
|
||||
# copy dev runtime files
|
||||
COPY dev/runtime/config.yml /etc/neko/neko.yml
|
||||
COPY dev/runtime/supervisord.debug.conf /etc/neko/supervisord/debug.conf
|
||||
COPY dev/runtime/supervisord.conf /etc/neko/supervisord/dev.conf
|
||||
|
||||
# customized scripts
|
||||
RUN chmod +x /usr/bin/dbus;\
|
||||
echo '#!/bin/sh\nsleep infinity' > /usr/bin/neko; \
|
||||
chmod +x /usr/bin/neko; \
|
||||
echo '#!/bin/sh\nsudo sh -c "export USER='$USERNAME'\nexport HOME=/home/'$USERNAME'\n/usr/bin/supervisord -c /etc/neko/supervisord.conf"' > /usr/bin/deps; \
|
||||
chmod +x /usr/bin/deps;
|
||||
chmod +x /usr/bin/deps; \
|
||||
touch .env.development;
|
||||
|
||||
# set default envs
|
||||
ENV USER=$USERNAME
|
||||
ENV DISPLAY=:99.0
|
||||
ENV NEKO_SERVER_BIND=:3000
|
||||
ENV NEKO_WEBRTC_EPR=3001-3004
|
||||
ENV BROWSER_KIOSK=false
|
||||
|
Reference in New Issue
Block a user