-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.visualizer
41 lines (28 loc) · 1.18 KB
/
Dockerfile.visualizer
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
FROM golang:1.14.6
WORKDIR /project
COPY ./go.* ./
RUN go mod download
COPY . ./
RUN CGO_ENABLED=0 GOOS=linux go install -v ./cmd/server/visualizer
FROM debian:buster-slim
RUN apt-get update
RUN apt-get -y install wget curl gnupg xvfb unzip fonts-ipafont fonts-ipaexfont dbus dbus-x11 \
locales task-japanese tzdata --fix-missing && apt clean && rm -rf /var/lib/apt/lists/*
RUN locale-gen ja_JP.UTF-8
RUN localedef -f UTF-8 -i ja_JP ja_JP
ENV LANG ja_JP.UTF-8
ENV LANGUAGE ja_JP:jp
ENV LC_ALL ja_JP.UTF-8
ENV TZ Asia/Tokyo
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
RUN apt-get update
RUN apt-get -y install google-chrome-stable
RUN wget -N -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip
RUN unzip /tmp/chromedriver.zip
RUN rm /tmp/chromedriver.zip
RUN chmod +x chromedriver
RUN mv -f chromedriver /usr/local/bin/chromedriver
COPY --from=0 /go/bin/visualizer /bin/visualizer
USER 1001
CMD ["/bin/visualizer"]