-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
58 lines (55 loc) · 1.54 KB
/
Dockerfile
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
#0############
# Run tests #
#############
FROM python:3.8-slim-buster as test
ENV \
# locale
LC_ALL=C.UTF-8 \
# python:
PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONHASHSEED=random \
# pip:
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
# debconf
DEBIAN_FRONTEND=noninteractive
COPY . /app
WORKDIR /app
RUN --mount=type=ssh apt-get update \
&& apt-get install -y \
curl \
git \
tini \
openssh-client \
# pre-commit needs to be able to build extensions
build-essential \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
# Install pre-commit
&& pip3 install pre-commit \
# check pre-commit stuff
&& docker/pre_commit_init.sh \
&& true
ENTRYPOINT ["/usr/bin/tini", "--", "docker/entrypoint-test.sh"]
#0####################
# deps for rendeding #
######################
FROM test as render_build
RUN --mount=type=ssh curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get update \
&& apt-get install -y \
pandoc \
wkhtmltopdf \
chromium \
yarn \
&& npm install --global mermaid-filter \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& true
ENTRYPOINT ["/bin/bash", "-l"]
FROM render_build as render
ENTRYPOINT ["/usr/bin/tini", "--", "docker/entrypoint-render.sh"]