diff --git a/Containerfile b/Containerfile index 1725e0c..73e79a4 100644 --- a/Containerfile +++ b/Containerfile @@ -1,4 +1,4 @@ -FROM docker.io/library/eclipse-temurin:21-jdk-alpine +FROM docker.io/library/eclipse-temurin:21-jdk ARG SCALA_VERSION ENV SCALA_VERSION ${SCALA_VERSION:-3.4.0} @@ -8,12 +8,18 @@ ENV SBT_VERSION ${SBT_VERSION:-1.9.9} # git is required for checkout # python3 is required for pre-commit # node is required for Forgejo checkout -RUN apk add curl bash git docker python3 py3-pip nodejs npm -RUN pip3 install pre-commit --break-system-packages +#RUN apk add curl bash git docker python3 py3-pip nodejs npm +RUN apt-get update +RUN apt-get install -y curl git docker python3 python3-pip nodejs + +# On Alpine, must include --break-system-packages +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 +#RUN addgroup -S -g 1000 builder +#RUN adduser -S -h /home/builder -s /bin/bash -G builder -u 1000 builder +RUN groupadd -g 1111 -r builder +RUN useradd -u 1111 -m -g 1111 -r builder # Switch to the build user. Everything else is installed at this level. USER builder diff --git a/build-and-run b/build-and-run new file mode 100755 index 0000000..3a1713e --- /dev/null +++ b/build-and-run @@ -0,0 +1,4 @@ +#!/bin/sh + +podman build --tag registry.garrity.co:8443/gs/ci-scala:latest . +podman run --rm -it --entrypoint bash registry.garrity.co:8443/gs/ci-scala:latest