This repository has been archived by the owner on Apr 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
56 lines (45 loc) · 1.65 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
FROM ubuntu:20.04
# Install Node.js v14.x
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -qq \
curl \
sudo \
git \
jq \
zip \
unzip \
make
RUN curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - \
&& sudo apt-get install -qq nodejs
# Install OpenJDK-8
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -qq openjdk-8-jdk && \
apt-get clean -qq && \
rm -rf /var/cache/oracle-jdk8-installer && \
rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
RUN export JAVA_HOME
# Set XDG environment variables explicitly so that GitHub Actions does not apply
# default paths that do not point to the plugins directory
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
ENV XDG_DATA_HOME=/sfdx_plugins/.local/share
ENV XDG_CONFIG_HOME=/sfdx_plugins/.config
ENV XDG_CACHE_HOME=/sfdx_plugins/.cache
# Create isolated plugins directory with rwx permission for all users
# Azure pipelines switches to a container-user which does not have access
# to the root directory where plugins are normally installed
RUN mkdir -p $XDG_DATA_HOME && \
mkdir -p $XDG_CONFIG_HOME && \
mkdir -p $XDG_CACHE_HOME && \
chmod -R 777 sfdx_plugins
RUN export XDG_DATA_HOME && \
export XDG_CONFIG_HOME && \
export XDG_CACHE_HOME
# Install SFDX CLI
RUN npm update -g && \
npm install [email protected] --global
# Install sfdx plugins
RUN echo 'y' | sfdx plugins:install [email protected]
RUN echo 'y' | sfdx plugins:install [email protected]
RUN echo 'y' | sfdx plugins:install @dxatscale/[email protected]