clean Docker files

master
urielCh 5 years ago
parent 6aa28926bd
commit 28e148ba82

@ -9,31 +9,56 @@ ENV DEBIAN_FRONTEND="noninteractive" \
# 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;\
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;\
rm -rf /var/cache/* /var/log/apt/* /var/lib/apt/lists/*;
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;\
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 -; \
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;\
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;\
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/*
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;\
@ -42,13 +67,8 @@ RUN set -ex;\
mv /opt/plugin /home/chrome/plugin;\
mv /opt/webRobotJS /home/chrome/webRobotJS
RUN set -ex;\
apt-get update;\
apt-get install -y --no-install-recommends iputils-ping net-tools;\
rm -rf /var/cache/* /var/log/apt/* /var/lib/apt/lists/*
# 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
# 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"]

@ -21,6 +21,10 @@ docker build -f 1.Dockerfile -t urielch/chrome-vnc:$(dpkg --print-architecture)
docker run -p 5900:5900 --name chrome urielch/chrome-vnc:$(dpkg --print-architecture)
docker exec -it chrome bash
docker rm -f chrome
docker build -t urielch/chrome-vnc:latest .
```

Loading…
Cancel
Save