smaller image

master
urielch 5 years ago
parent 54c454eb7d
commit 7379e50734

@ -13,59 +13,32 @@ RUN set -ex;\
echo ;\
echo installing other packages;\
echo ;\
apt-get install -y xvfb fonts-takao pulseaudio supervisor x11vnc xdg-utils libnss3 libnspr4 libcairo2 libatk1.0-0 fonts-liberation libappindicator3-1 libatk-bridge2.0-0 libpango-1.0-0;\
optsDeps="iputils-ping net-tools apt-utils";\
apt-get install -y xvfb fonts-takao pulseaudio supervisor x11vnc xdg-utils libnss3 libnspr4 libcairo2 libatk1.0-0 fonts-liberation libappindicator3-1 libatk-bridge2.0-0 libpango-1.0-0 wget $optsDeps chromium-browser;\
rm -rf /var/cache/* /var/log/apt/* /var/lib/apt/lists/*;
# ca-certificates
RUN set -ex;\
apt-get update;\
echo ;\
echo installing other packages 2;\
echo ;\
commonsDeps="curl wget";\
optsDeps="iputils-ping net-tools";\
apt-get install -y $commonsDeps $optsDeps chromium-browser;\
rm -rf /var/cache/* /var/log/apt/* /var/lib/apt/lists/*;
#RUN set -ex;\
# apt-get update;\
# commonsDeps="curl wget";\
# optsDeps="iputils-ping net-tools apt-utils";\
# apt-get install -y $commonsDeps $optsDeps chromium-browser;\
# rm -rf /var/cache/* /var/log/apt/* /var/lib/apt/lists/*;
RUN set -ex;\
apt-get update;\
fetchDeps="git ca-certificates openssl apt-utils gnupg2 build-essential libxtst-dev libpng++-dev";\
apt-get install -y --no-install-recommends $fetchDeps $commonsDeps;\
curl -sL https://deb.nodesource.com/setup_10.x | bash -; \
echo setup node; \
wget -qO- https://deb.nodesource.com/setup_10.x | /bin/bash -;\
apt-get install -y nodejs;\
echo ;\
echo building webRobotJS;\
echo ;\
git clone https://github.com/UrielCh/webRobotJS /opt/webRobotJS;\
cd /opt/webRobotJS;\
rm -rf .git;\
npm install;\
echo ;\
echo building chrome plugin;\
echo ;\
git clone https://github.com/UrielCh/zombie-plugin /tmp/zombie-plugin; \
cd /tmp/zombie-plugin;\
npm install -g typescript browserify;\
npm install;\
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;\
mv /tmp/zombie-plugin/dist /opt/plugin;\
cd /;\
rm -rf /tmp/zombie-plugin;\
echo ;\
echo cleaning;\
echo ;\
npm -g uninstall typescript browserify;\
apt-get purge -y --auto-remove $fetchDeps; \
rm -rf /var/cache/* /var/log/apt/* /var/lib/apt/lists/*;
RUN set -ex;\
useradd --create-home --groups pulse-access --password chrome chrome;\
{ echo "chrome"; echo "chrome"; } | passwd chrome;\
chown -R chrome:chrome /home/chrome/;\
mv /opt/plugin /home/chrome/plugin;\
mv /opt/webRobotJS /home/chrome/webRobotJS
chown -R chrome:chrome /home/chrome/; \
cd /home/chrome; \
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

@ -16,7 +16,7 @@ priority=200
[program:node]
environment=HOME="/home/chrome",DISPLAY=":1",USER="chrome"
directory=/home/chrome/webRobotJS
command=/usr/bin/node zService.js
command=/usr/bin/node main.js
user=chrome
autorestart=true
priority=200

Loading…
Cancel
Save