From a0def97fe9f1db3a991c62b2a46821a063a2191d Mon Sep 17 00:00:00 2001 From: Pat Garrity Date: Sat, 16 Mar 2024 15:00:45 -0500 Subject: [PATCH] Initializing the image repository. --- Dockerfile | 20 ++++++++++++++++++++ README.md | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4c97001 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM docker.io/library/eclipse-temurin:21-jdk-alpine + +RUN apk add curl bash git docker python3 py3-pip +RUN pip3 install pre-commit --break-system-packages + +# Create the user - builds do not run as root. +RUN addgroup -S -g 1000 builder +RUN adduser -S -h /home/builder -s /bin/bash -G builder -u 1000 builder + +# Switch to the build user. Everything else is installed at this level. +USER builder +WORKDIR /home/builder + +RUN curl -fLo coursier https://github.com/coursier/launchers/raw/master/coursier +RUN chmod +x coursier +RUN ./coursier setup --yes --apps coursier,sbt-launcher,scalafmt +RUN rm ./coursier +RUN mkdir -p /home/builder/.local/bin +ENV PATH="${PATH}:/home/builder/.local/share/coursier/bin" +ENV PATH="${PATH}:/home/builder/.local/bin" diff --git a/README.md b/README.md new file mode 100644 index 0000000..ad5777d --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# ci-scala + +Produces a container image suitable for Scala builds within the Garrity Software +ecosystem.