add standalone Dockerfile
This commit is contained in:
parent
d621e66b85
commit
3a014dd2a7
54
Dockerfile
Normal file
54
Dockerfile
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
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;\
|
||||||
|
fetchDeps="git ca-certificates openssl apt-utils gnupg2 build-essential libxtst-dev libpng++-dev";\
|
||||||
|
apt-get update;\
|
||||||
|
apt-get upgrade -y;\
|
||||||
|
apt-get install -y --no-install-recommends $fetchDeps curl;\
|
||||||
|
curl -s https://deb.nodesource.com/setup_10.x -o /setup_10.x;\
|
||||||
|
chmod +x /setup_10.x && /setup_10.x;\
|
||||||
|
apt-get install -y nodejs;\
|
||||||
|
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 ..;\
|
||||||
|
cp -r /webRobotJS /opt;\
|
||||||
|
cp -r /zombie-plugin/dist /opt/plugin; \
|
||||||
|
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;\
|
||||||
|
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
|
||||||
|
|
||||||
|
ADD conf/ /
|
||||||
|
|
||||||
|
# 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"]
|
@ -5,38 +5,39 @@ ENV DEBIAN_FRONTEND="noninteractive" \
|
|||||||
LC_ALL="C.UTF-8" \
|
LC_ALL="C.UTF-8" \
|
||||||
LANG="en_US.UTF-8" \
|
LANG="en_US.UTF-8" \
|
||||||
LANGUAGE="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 \
|
RUN set -ex;\
|
||||||
sed -i s@http://archive\.ubuntu\.com/ubuntu/@mirror://mirrors.ubuntu.com/mirrors.txt@ /etc/apt/sources.list &&\
|
apt-get update;\
|
||||||
apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends git curl ca-certificates apt-utils gnupg2 build-essential libxtst-dev libpng++-dev &&\
|
apt-get install -y --no-install-recommends git curl ca-certificates apt-utils gnupg2 build-essential libxtst-dev libpng++-dev;\
|
||||||
curl https://deb.nodesource.com/setup_10.x -o /setup_10.x &&\
|
curl -sL https://deb.nodesource.com/setup_10.x | bash -;\
|
||||||
chmod +x /setup_10.x && /setup_10.x &&\
|
apt-get install -y nodejs;\
|
||||||
apt-get install -y nodejs &&\
|
apt-get clean && rm -rf /var/cache/* /var/log/* /var/lib/apt/lists/*;
|
||||||
apt-get clean && rm -rf /var/cache/* /var/log/* /var/lib/apt/lists/*
|
# apt update;\
|
||||||
# apt update &&\
|
|
||||||
|
|
||||||
RUN \
|
RUN set -ex;\
|
||||||
git clone https://github.com/UrielCh/webRobotJS &&\
|
git clone https://github.com/UrielCh/webRobotJS;\
|
||||||
cd webRobotJS &&\
|
cd webRobotJS;\
|
||||||
rm -rf .git &&\
|
rm -rf .git;\
|
||||||
npm install && cd .. &&\
|
npm install; cd ..;\
|
||||||
git clone https://github.com/UrielCh/zombie-plugin &&\
|
git clone https://github.com/UrielCh/zombie-plugin;\
|
||||||
cd zombie-plugin &&\
|
cd zombie-plugin;\
|
||||||
rm -rf .git &&\
|
rm -rf .git;\
|
||||||
npm install &&\
|
npm install;\
|
||||||
npm install -g typescript browserify &&\
|
npm install -g typescript browserify;\
|
||||||
tsc -p . &&\
|
tsc -p .;\
|
||||||
cp ./built/client.js ./dist/js/client.js &&\
|
cp ./built/client.js ./dist/js/client.js;\
|
||||||
browserify ./built/popup.js > ./dist/js/popup.js &&\
|
browserify ./built/popup.js > ./dist/js/popup.js;\
|
||||||
browserify ./built/background.js > ./dist/js/background.js &&\
|
browserify ./built/background.js > ./dist/js/background.js;\
|
||||||
cd ..
|
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 &&\
|
# 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 \
|
RUN set -ex;\
|
||||||
echo '#!/bin/bash' > /dl.sh &&\
|
echo '#!/bin/bash' > /dl.sh;\
|
||||||
echo 'cp -r /webRobotJS /opt' >> dl.sh &&\
|
echo 'cp -r /webRobotJS /opt' >> /dl.sh;\
|
||||||
echo 'cp -r /zombie-plugin/dist /opt/plugin' >> dl.sh &&\
|
echo 'cp -r /zombie-plugin/dist /opt/plugin' >> /dl.sh;\
|
||||||
echo 'cp /setup_10.x /opt' >> dl.sh &&\
|
echo 'cp /setup_10.x /opt' >> /dl.sh;\
|
||||||
echo 'echo All Done' >> dl.sh &&\
|
echo 'echo All Done' >> /dl.sh;\
|
||||||
chmod +x /dl.sh
|
chmod +x /dl.sh
|
||||||
|
|
||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
|
Loading…
Reference in New Issue
Block a user