-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathDockerfile
54 lines (44 loc) · 1.92 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
# Docker image to run sfdx-hardis
FROM python:3.12.8-alpine3.20
LABEL maintainer="Nicolas VUILLAMY <[email protected]>"
RUN apk add --update --no-cache \
coreutils \
git \
bash \
nodejs \
npm \
# Required for docker
docker \
openrc \
# Required for puppeteer
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont
# Start docker daemon in case mermaid-cli image is used
RUN rc-update add docker boot && (rc-service docker start || true)
# Do not use puppeteer embedded chromium
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
ENV CHROMIUM_PATH="/usr/bin/chromium-browser"
ENV PUPPETEER_EXECUTABLE_PATH="${CHROMIUM_PATH}"
# Add node packages to path #
# hadolint ignore=DL3044
ENV PATH="/node_modules/.bin:${PATH}"
ARG SFDX_CLI_VERSION=latest
ARG SFDX_HARDIS_VERSION=latest
# Install npm packages +install sfdx plugins & display versions
RUN npm install --no-cache yarn -g && \
npm install --no-cache @salesforce/cli@${SFDX_CLI_VERSION} -g && \
sf plugins install @salesforce/plugin-packaging && \
echo 'y' | sf plugins install sfdx-hardis@${SFDX_HARDIS_VERSION} && \
echo 'y' | sf plugins install sfdmu && \
echo 'y' | sf plugins install sfdx-git-delta && \
echo 'y' | sf plugins install texei-sfdx-plugin && \
sf version --verbose --json && \
rm -rf /root/.npm/_cacache
ENV MERMAID_MODES="docker"
# Workaround for https://github.com/forcedotcom/salesforcedx-apex/issues/213
COPY ref/workarounds/dateUtil.js /usr/local/lib/node_modules/@salesforce/cli/node_modules/@salesforce/apex-node/lib/src/utils/dateUtil.js
COPY ref/workarounds/junitReporter.js /usr/local/lib/node_modules/@salesforce/cli/node_modules/@salesforce/apex-node/lib/src/reporters/junitReporter.js