-
Notifications
You must be signed in to change notification settings - Fork 33
/
Dockerfile
67 lines (52 loc) · 1.8 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
59
60
61
62
63
64
65
66
FROM ubuntu:20.04
LABEL maintainer="Fred Tingaud <[email protected]>"
USER root
ARG BACKEND_BRANCH=main
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
procmail \
curl \
gnupg2 \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common \
npm \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RUN npm cache clean -f && \
npm install -g n && \
n stable
RUN add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable" && \
apt-get update && \
apt-get install -y --no-install-recommends \
nodejs \
yarn \
docker-ce \
docker-ce-cli \
containerd.io \
&& rm -rf /var/lib/apt/lists/*
ADD https://api.github.com/repos/fredtingaud/quick-bench-back-end/git/refs/heads/${BACKEND_BRANCH} /tmp/backend-version.json
RUN git clone -b ${BACKEND_BRANCH} https://github.com/FredTingaud/quick-bench-back-end /quick-bench && \
cd /quick-bench && \
npm install && \
./seccomp.js && \
sysctl -w kernel.perf_event_paranoid=1
ADD https://api.github.com/repos/fredtingaud/quick-bench-front-end/git/refs/heads/main /tmp/frontend-version.json
RUN git clone -b main https://github.com/FredTingaud/quick-bench-front-end /quick-bench/quick-bench-front-end && \
cd /quick-bench/quick-bench-front-end/build-bench && \
yarn && \
yarn build && \
cd ../quick-bench && \
yarn && \
yarn build
COPY ./build-scripts/start-* /quick-bench/
WORKDIR /quick-bench