-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
63 lines (52 loc) · 1.55 KB
/
Dockerfile
File metadata and controls
63 lines (52 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM ubuntu:16.04
MAINTAINER Fumiaki Kato
ENV CHROME_VERSION 2.31
ENV WORKSPACE /selenium-work
RUN sed -i "s:archive.ubuntu.com:ftp.jaist.ac.jp/pub/Linux:g" /etc/apt/sources.list
RUN apt-get update -y
# prepare
RUN apt-get install -y software-properties-common \
&& add-apt-repository -y ppa:brightbox/ruby-ng
RUN apt-get update -y
# install library and ruby
RUN apt-get install -y \
libappindicator1 \
fonts-liberation \
zlib1g-dev \
zip \
unzip \
ruby2.2 \
ruby2.2-dev \
bundler \
wget \
gconf-service \
libasound2 \
libgconf-2-4 \
libnspr4 \
libxss1 \
libnss3 \
xdg-utils \
fonts-ipafont-gothic fonts-ipafont-mincho
# create workspace
RUN mkdir -p ${WORKSPACE} \
&& mkdir -p ${WORKSPACE}/image \
&& mkdir -p ${WORKSPACE}/install \
&& mkdir -p ${WORKSPACE}/work
# copy Gemfile
COPY script/Gemfile ${WORKSPACE}/install
# install chromedriver
RUN cd ${WORKSPACE}/install \
&& wget "https://chromedriver.storage.googleapis.com/${CHROME_VERSION}/chromedriver_linux64.zip" \
&& unzip chromedriver_linux64.zip \
&& chmod +x chromedriver \
&& mv -f chromedriver /usr/local/share/chromedriver \
&& ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver \
&& ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
# install google-chrome
RUN cd ${WORKSPACE}/install \
&& touch /etc/default/google-chrome \
&& wget "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" \
&& dpkg -i google-chrome-stable_current_amd64.deb
# bundle install
RUN cd ${WORKSPACE}/install \
&& bundle install