ci-scala/Dockerfile

20 lines
743 B
Docker

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"