From 905107440ebf1ce50ba6ac51b480c508dfc27091 Mon Sep 17 00:00:00 2001 From: ochko Date: Mon, 21 Jan 2019 17:39:31 +0900 Subject: [PATCH] add 2.6-gui0 --- 2.6/gui/Dockerfile | 45 ++++++++++++++++++++++++++++++++++++ 2.6/gui/docker-entrypoint.sh | 10 ++++++++ 2 files changed, 55 insertions(+) create mode 100644 2.6/gui/Dockerfile create mode 100755 2.6/gui/docker-entrypoint.sh diff --git a/2.6/gui/Dockerfile b/2.6/gui/Dockerfile new file mode 100644 index 0000000000..c1b3cf1f29 --- /dev/null +++ b/2.6/gui/Dockerfile @@ -0,0 +1,45 @@ +FROM ruby:2.6.0 + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + unzip \ + qt5-default \ + libqt5webkit5-dev \ + gstreamer1.0-plugins-base \ + gstreamer1.0-tools \ + gstreamer1.0-x \ + locales \ + fonts-ipafont-gothic xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic \ + xvfb + +RUN fc-cache -f && \ + echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \ + dpkg-reconfigure --frontend=noninteractive locales && \ + update-locale LANG=en_US.UTF-8 + +ENV LANG=en_US.UTF-8 \ + LANGUAGE=en_US.UTF-8 \ + LC_ALL=en_US.UTF-8 \ + PHANTOMJS=phantomjs-2.1.1-linux-x86_64 + +WORKDIR /usr/local/share + +RUN curl -s -S --retry 3 -f -L -O https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOMJS.tar.bz2 && \ + tar xvjf $PHANTOMJS.tar.bz2 && \ + ln -sf /usr/local/share/$PHANTOMJS/bin/phantomjs /usr/local/bin + +# Install Chrome +RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \ + echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \ + apt-get update && \ + apt-get install -y --no-install-recommends google-chrome-stable + +# Install ChromeDriver +RUN CHROME_DRIVER_VERSION=$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE) && \ + curl -s -S --retry 3 -f -L -O http://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VERSION}/chromedriver_linux64.zip && \ + unzip chromedriver_linux64.zip -d /usr/local/bin/ && \ + rm chromedriver_linux64.zip && \ + chmod 0755 /usr/local/bin/chromedriver + +COPY ./docker-entrypoint.sh / +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/2.6/gui/docker-entrypoint.sh b/2.6/gui/docker-entrypoint.sh new file mode 100755 index 0000000000..8201b3ceba --- /dev/null +++ b/2.6/gui/docker-entrypoint.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +export DISPLAY=:99 +PIDFILE=/tmp/custom_xvfb_99.pid + +/sbin/start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16 +exec "${@}" +EXITCODE=$? +/sbin/start-stop-daemon --stop --quiet --pidfile $PIDFILE +exit $EXITCODE