forked from hardisgroupcom/sfdx-hardis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-ubuntu
More file actions
90 lines (80 loc) · 2.8 KB
/
Copy pathDockerfile-ubuntu
File metadata and controls
90 lines (80 loc) · 2.8 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Docker image to run sfdx-hardis
FROM ubuntu:latest
LABEL maintainer="Nicolas VUILLAMY <nicolas.vuillamy@cloudity.com>"
ENV SF_DATA_DIR=/usr/local/lib
# Update package list and install required packages
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
gnupg \
# Required for Python
python3 \
python3-pip \
python3-venv \
# Required for docker
docker.io \
fonts-liberation \
# Required for mermaid cli
libglib2.0-0 \
libnss3 \
libx11-6 \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxi6 \
libxtst6 \
libdrm2 \
libgbm1 \
libpango-1.0-0 \
libatk1.0-0 \
libcups2 \
libatspi2.0-0 \
libgtk-3-0 \
libasound2t64 \
wget \
xdg-utils \
libvulkan1 \
&& \
# Create python symlink for compatibility
ln -sf /usr/bin/python3 /usr/bin/python && \
ln -sf /usr/bin/pip3 /usr/bin/pip && \
# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get install -y nodejs && \
# Chrome installation
wget -q -O google-chrome-stable_current_amd64.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
apt-get install -y ./google-chrome-stable_current_amd64.deb && \
rm google-chrome-stable_current_amd64.deb && \
# Clean up
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Add node packages to path
ENV PATH="/node_modules/.bin:${PATH}"
# Chromium path for puppeteer
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
ENV CHROMIUM_PATH="/usr/bin/google-chrome"
ENV PUPPETEER_EXECUTABLE_PATH="${CHROMIUM_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 && \
npm install --no-cache @mermaid-js/mermaid-cli -g && \
sf plugins install @salesforce/plugin-packaging && \
sf plugins install @salesforce/plugin-deploy-retrieve && \
echo 'y' | sf plugins install sfdx-hardis@${SFDX_HARDIS_VERSION} && \
echo 'y' | sf plugins install sfdx-git-delta && \
echo 'y' | sf plugins install sfdmu && \
sf version --verbose --json && \
# Clean up npm cache and temporary files
rm -rf /root/.npm/_cacache && \
rm -rf /tmp/* && \
npm cache clean --force
ENV MERMAID_MODES="cli"
# 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