-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.CI
43 lines (34 loc) · 1.42 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
FROM ubuntu
# base
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
--no-install-recommends
# Install Node.js
RUN curl -sL https://deb.nodesource.com/setup_15.x | bash - \
&& apt-get install -y nodejs build-essential
# Install Java for sonar scanner
RUN apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y default-jre
# Install Rust to build the documentation
RUN apt-get update -y && apt-get install -y cargo
RUN cargo install mdbook mdbook-open-on-gh
RUN apt-get update -y \
&& apt-get install -y perl pkg-config libssl-dev \
&& cargo install mdbook-linkcheck
# Install yarn for package management
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 -y && apt-get install -y --no-install-recommends yarn \
&& rm -rf /etc/apt/sources.list.d/yarn.list
# Install Chromium for test execution
RUN apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y chromium-browser
# Perform cleanup
RUN apt-get purge --auto-remove -y curl gnupg \
&& rm -rf /var/lib/apt/lists/*
# Setup package cache for yarn and cache current dependencies
ENV YARN_CACHE_FOLDER=/cache/yarn
ADD yarn.lock yarn.lock
ADD package.json package.json
RUN yarn install --frozen-lockfile --non-interactive && rm -rf node_modules package.json yarn.lock