Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
fix(cicd): add plugin home
Browse files Browse the repository at this point in the history
  • Loading branch information
azlam-abdulsalam committed Sep 18, 2023
1 parent 13b70bf commit 2ae2328
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions dockerfiles/sfpowerscripts.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ LABEL org.opencontainers.image.title "DX@Scale sfpowercripts docker image - Augu
ENV DEBIAN_FRONTEND=noninteractive


RUN ln -sf bash /bin/sh


RUN apt-get update \
Expand Down Expand Up @@ -64,12 +65,21 @@ RUN npm install --global --omit=dev \
&& npm cache clean --force



# 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=/sf_plugins/.local/share \
XDG_CONFIG_HOME=/sf_plugins/.config \
XDG_CACHE_HOME=/sf_plugins/.cache \
JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/


# Create symbolic link from sh to bash
# 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 ln -sf bash /bin/sh && \
mkdir -p $XDG_DATA_HOME && \
RUN mkdir -p $XDG_DATA_HOME && \
mkdir -p $XDG_CONFIG_HOME && \
mkdir -p $XDG_CACHE_HOME && \
chmod -R 777 sfdx_plugins && \
Expand Down

0 comments on commit 2ae2328

Please sign in to comment.