light version using/bin/sh on alpine

master
urielch 5 years ago
parent 7379e50734
commit e0cddbc00f

@ -1,41 +0,0 @@
FROM ubuntu:18.10
LABEL maintainer="urielCh <admin@uriel.ovh>"
ENV VNC_PASSWORD="" \
DEBIAN_FRONTEND="noninteractive" \
LC_ALL="C.UTF-8" \
LANG="en_US.UTF-8" \
LANGUAGE="en_US.UTF-8"
ADD res/setup_10.x /tmp/
# ADD res/google-chrome-stable_current_amd64.deb /tmp/
# dpkg -i /tmp/google-chrome-stable_current_amd64.deb &&\
RUN \
sed -i s@http://archive\.ubuntu\.com/ubuntu/@mirror://mirrors.ubuntu.com/mirrors.txt@ /etc/apt/sources.list &&\
apt-get update && apt-get install -y --no-install-recommends apt-utils gnupg2 &&\
cat /tmp/setup_10.x | bash - &&\
apt-get update &&\
apt-get install -y curl xvfb nodejs fonts-takao pulseaudio supervisor x11vnc xdg-utils libnss3 wget libnspr4 libcairo2 libatk1.0-0 fonts-liberation libappindicator3-1 libatk-bridge2.0-0 libpango-1.0-0 chromium-browser &&\
apt-get clean &&\
rm -rf /var/cache/* /var/log/apt/* /var/lib/apt/lists/* /tmp/setup_10.x
RUN useradd --create-home --groups pulse-access --password chrome chrome &&\
{ echo "chrome"; echo "chrome"; } | passwd chrome &&\
chown -R chrome:chrome /home/chrome/
ADD /res/plugin /home/chrome/plugin
ADD /res/webRobotJS /home/chrome/webRobotJS
# RUN apt-get install -y xvfb && echo rm -rf /tmp/*
#RUN apt-get update && apt-get install -y && dpkg -i /tmp/google-chrome-stable_current_amd64.deb
ADD conf/ /
RUN chmod +x /*.sh
VOLUME ["/home/chrome"]
EXPOSE 5900
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

@ -0,0 +1,25 @@
FROM alpine:3.9
LABEL maintainer="urielCh <admin@uriel.ovh>"
ENV LC_ALL="C.UTF-8" \
LANG="en_US.UTF-8" \
LANGUAGE="en_US.UTF-8"
RUN apk add --no-cache xvfb pulseaudio supervisor x11vnc xdg-utils wget chromium nodejs
RUN set -ex;\
adduser -D -u 1000 chrome pulse-access;\
mkdir -p /home/chrome/plugin /home/chrome/webRobotJS; \
wget -qO- https://github.com/UrielCh/zombie-plugin/releases/download/4.0.0/zombie-v4.0.0.tar.gz | tar xvz -C /home/chrome/plugin/; \
wget -qO- https://github.com/UrielCh/webRobotJS/releases/download/v1.0.0/roboJsWeb-x86_64-node-v10.tar.gz | tar xvz -C /home/chrome/webRobotJS/;
# RUN apt-get install -y xvfb && echo rm -rf /tmp/*
# RUN apt-get update && apt-get install -y && dpkg -i /tmp/google-chrome-stable_current_amd64.deb
ADD conf/ /
RUN chmod +x /*.sh
VOLUME ["/home/chrome"]
EXPOSE 5900
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -e
. ./env.sh
# VNC default no password
@ -8,13 +8,7 @@ export X11VNC_AUTH="-nopw"
#echo "chrome" | vncpasswd -f > /opt/vncpasswd
# look for VNC password file in order (first match is used)
passwd_files=(
/home/chrome/.vnc/passwd
/run/secrets/vncpasswd
# /opt/vncpasswd
)
for passwd_file in ${passwd_files[@]}; do
for passwd_file in /home/chrome/.vnc/passwd /run/secrets/vncpasswd; do
if [[ -f ${passwd_file} ]]; then
export X11VNC_AUTH="-rfbauth ${passwd_file}"
break

@ -1,43 +0,0 @@
FROM ubuntu:18.10
LABEL maintainer="urielCh <admin@uriel.ovh>"
ENV DEBIAN_FRONTEND="noninteractive" \
LC_ALL="C.UTF-8" \
LANG="en_US.UTF-8" \
LANGUAGE="en_US.UTF-8"
# sed -i s@http://archive\.ubuntu\.com/ubuntu/@mirror://mirrors.ubuntu.com/mirrors.txt@ /etc/apt/sources.list &&\
RUN set -ex;\
apt-get update;\
apt-get install -y --no-install-recommends git curl ca-certificates apt-utils gnupg2 build-essential libxtst-dev libpng++-dev;\
curl -sL https://deb.nodesource.com/setup_10.x | bash -;\
apt-get install -y nodejs;\
apt-get clean && rm -rf /var/cache/* /var/log/* /var/lib/apt/lists/*;
# apt update;\
RUN set -ex;\
git clone https://github.com/UrielCh/webRobotJS;\
cd webRobotJS;\
rm -rf .git;\
npm install; cd ..;\
git clone https://github.com/UrielCh/zombie-plugin;\
cd zombie-plugin;\
rm -rf .git;\
npm install;\
npm install -g typescript browserify;\
tsc -p .;\
cp ./built/client.js ./dist/js/client.js;\
browserify ./built/popup.js > ./dist/js/popup.js;\
browserify ./built/background.js > ./dist/js/background.js;\
cd ..
# echo 'curl https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /opt/google-chrome-stable_current_amd64.deb' >> dl.sh &&\
RUN set -ex;\
echo '#!/bin/bash' > /dl.sh;\
echo 'cp -r /webRobotJS /opt' >> /dl.sh;\
echo 'cp -r /zombie-plugin/dist /opt/plugin' >> /dl.sh;\
echo 'cp /setup_10.x /opt' >> /dl.sh;\
echo 'echo All Done' >> /dl.sh;\
chmod +x /dl.sh
WORKDIR /opt
Loading…
Cancel
Save