mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
fix runtime dockerfile.
This commit is contained in:
parent
5f321b52e5
commit
a392163819
@ -20,4 +20,4 @@ fi
|
|||||||
docker build -t neko_server_build --target build --build-arg "GIT_COMMIT=$GIT_COMMIT" --build-arg "GIT_BRANCH=$GIT_BRANCH" -f ../$DOCKERFILE ..
|
docker build -t neko_server_build --target build --build-arg "GIT_COMMIT=$GIT_COMMIT" --build-arg "GIT_BRANCH=$GIT_BRANCH" -f ../$DOCKERFILE ..
|
||||||
docker build -t neko_server_runtime --target runtime --build-arg "GIT_COMMIT=$GIT_COMMIT" --build-arg "GIT_BRANCH=$GIT_BRANCH" -f ../$DOCKERFILE ..
|
docker build -t neko_server_runtime --target runtime --build-arg "GIT_COMMIT=$GIT_COMMIT" --build-arg "GIT_BRANCH=$GIT_BRANCH" -f ../$DOCKERFILE ..
|
||||||
|
|
||||||
docker build -t neko_server_app --build-arg "BASE_IMAGE=neko_server_runtime" -f ./runtime/$DOCKERFILE ./runtime
|
docker build -t neko_server_app --build-arg "BASE_IMAGE=neko_server_runtime" -f ./runtime/Dockerfile ./runtime
|
||||||
|
@ -1,16 +1,28 @@
|
|||||||
ARG BASE_IMAGE=neko_server_runtime:latest
|
ARG BASE_IMAGE=neko_server_runtime:latest
|
||||||
FROM $BASE_IMAGE
|
FROM $BASE_IMAGE
|
||||||
|
|
||||||
|
ARG SRC_URL="https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US"
|
||||||
|
|
||||||
#
|
#
|
||||||
# install xfce
|
# install xfce and firefox
|
||||||
RUN set -eux; apt-get update; \
|
RUN set -eux; apt-get update; \
|
||||||
apt-get install -y --no-install-recommends xfce4 xfce4-terminal firefox-esr sudo; \
|
apt-get install -y --no-install-recommends \
|
||||||
|
xfce4 xfce4-terminal sudo \
|
||||||
|
xz-utils bzip2 libgtk-3-0 libdbus-glib-1-2; \
|
||||||
|
#
|
||||||
|
# fetch latest firefox release
|
||||||
|
wget -O /tmp/firefox-setup.tar.bz2 "${SRC_URL}"; \
|
||||||
|
mkdir /usr/lib/firefox; \
|
||||||
|
tar -xjf /tmp/firefox-setup.tar.bz2 -C /usr/lib; \
|
||||||
|
rm -f /tmp/firefox-setup.tar.bz2; \
|
||||||
|
ln -s /usr/lib/firefox/firefox /usr/bin/firefox; \
|
||||||
#
|
#
|
||||||
# add user to sudoers
|
# add user to sudoers
|
||||||
usermod -aG sudo neko; \
|
usermod -aG sudo neko; \
|
||||||
echo "neko:neko" | chpasswd; \
|
echo "neko:neko" | chpasswd; \
|
||||||
echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
|
echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
|
||||||
# clean up
|
# clean up
|
||||||
|
apt-get --purge autoremove -y xz-utils bzip2; \
|
||||||
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,20 +0,0 @@
|
|||||||
ARG BASE_IMAGE=neko_server_runtime:latest
|
|
||||||
FROM $BASE_IMAGE
|
|
||||||
|
|
||||||
#
|
|
||||||
# install xfce
|
|
||||||
RUN set -eux; apt-get update; \
|
|
||||||
# nvidia docker does not have firefox only firefox-esr
|
|
||||||
apt-get install -y --no-install-recommends xfce4 xfce4-terminal firefox sudo; \
|
|
||||||
#
|
|
||||||
# add user to sudoers
|
|
||||||
usermod -aG sudo neko; \
|
|
||||||
echo "neko:neko" | chpasswd; \
|
|
||||||
echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
|
|
||||||
# clean up
|
|
||||||
apt-get clean -y; \
|
|
||||||
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
|
||||||
|
|
||||||
#
|
|
||||||
# copy configuation files
|
|
||||||
COPY supervisord.conf /etc/neko/supervisord/xfce.conf
|
|
@ -55,5 +55,6 @@ docker run --rm -it \
|
|||||||
-v "${PWD}/runtime/$CONFIG:/etc/neko/neko.yml" \
|
-v "${PWD}/runtime/$CONFIG:/etc/neko/neko.yml" \
|
||||||
-e "NEKO_DEBUG=1" \
|
-e "NEKO_DEBUG=1" \
|
||||||
--shm-size=2G \
|
--shm-size=2G \
|
||||||
|
--security-opt seccomp=unconfined \
|
||||||
$EXTRAOPTS \
|
$EXTRAOPTS \
|
||||||
neko_server_app:latest;
|
neko_server_app:latest;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user