forked from gotenberg/gotenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.ci
50 lines (39 loc) · 1.66 KB
/
Dockerfile.ci
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
FROM golang:1.10-stretch
LABEL authors="Julien Neuhart <[email protected]>"
# |--------------------------------------------------------------------------
# | Libraries
# |--------------------------------------------------------------------------
# |
# | Installs all required libraries.
# |
RUN echo "deb http://httpredir.debian.org/debian/ stretch main contrib non-free" > /etc/apt/sources.list &&\
apt-get update &&\
apt-get install -y xvfb wkhtmltopdf pdftk unoconv ttf-mscorefonts-installer &&\
ln -s /usr/bin/xvfb-run /usr/local/bin/xvfb-run &&\
ln -s /usr/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf &&\
ln -s /usr/bin/pdftk /usr/local/bin/pdftk &&\
ln -s /usr/bin/unoconv /usr/local/bin/unoconv
RUN apt-get install -y curl gnupg &&\
curl -sL https://deb.nodesource.com/setup_8.x | bash - &&\
apt-get update &&\
apt-get install -y nodejs
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\
apt-get update &&\
apt-get install -y yarn bzip2 &&\
yarn global add markdown-pdf --prefix /usr/local
# |--------------------------------------------------------------------------
# | Gotenberg
# |--------------------------------------------------------------------------
# |
# | All Gotenberg related stuff.
# |
WORKDIR /go/src/github.com/thecodingmachine/gotenberg
# Installs lint dependencies.
RUN go get -u gopkg.in/alecthomas/gometalinter.v2 &&\
gometalinter.v2 --install
# Copies our Go source.
COPY . .
# Installs project dependencies.
RUN go get -d -v ./...
ENTRYPOINT [".ci/docker-entrypoint.sh"]