Skip to content

Commit

Permalink
Slim down image
Browse files Browse the repository at this point in the history
  • Loading branch information
jlantz committed Nov 15, 2024
1 parent 83b861c commit 8d5f141
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,30 @@ LABEL org.opencontainers.image.source="https://github.com/muselab-d2x/d2x"

ENV DEBIAN_FRONTEND=noninteractive

# Install system dependencies
# Install minimal system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
gnupg \
lsb-release \
software-properties-common \
apt-transport-https \
ca-certificates \
xz-utils \
openjdk-17-jdk-headless \
git \
jq && \
openjdk-17-jdk-headless \
xz-utils && \
rm -rf /var/lib/apt/lists/*

# Install Node.js from NodeSource repository
# Install Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/*

# Ensure npm is at the latest version
RUN npm install -g npm@latest

# Ensure that /usr/local/lib/nodejs/bin is in PATH
ENV PATH="/usr/local/lib/nodejs/bin:${PATH}"
rm -rf /var/lib/apt/lists/* && \
npm install -g npm@latest

# Install Salesforce CLI via official TAR file
RUN curl -fsSL https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-linux-x64.tar.xz -o sf-linux-x64.tar.xz && \
mkdir -p /usr/local/sf && \
tar xJf sf-linux-x64.tar.xz -C /usr/local/sf --strip-components 1 && \
rm sf-linux-x64.tar.xz

# Ensure that sf CLI is in PATH
ENV PATH="/usr/local/sf/bin:${PATH}"
ENV PATH="/usr/local/sf/bin:/usr/local/bin:${PATH}"

# Install CumulusCI and Cookiecutter
# Install CumulusCI
RUN pip install --no-cache-dir \
docutils \
"git+https://github.com/muselab-d2x/CumulusCI@d2x-merge-cci4" \
Expand Down

0 comments on commit 8d5f141

Please sign in to comment.