diff --git a/scripts/Dockerfile.singularity-arm64-shim b/scripts/Dockerfile.singularity-arm64-shim new file mode 100644 index 00000000..24d34c9f --- /dev/null +++ b/scripts/Dockerfile.singularity-arm64-shim @@ -0,0 +1,26 @@ +# no longer pushed to - vanessa declared dockerhub insecure +#FROM singularityware/singularity:v3.3.0-slim +FROM quay.io/singularity/singularity:v3.10.0-arm64 + +RUN apk update \ + && apk add bash sudo \ + && rm -rf /var/cache/apk/* \ + && mv /etc/localtime /etc/localtime.docker \ + && printf '#!/bin/bash\n\ + set -eu\n\ + USERNAME=$(sed -rn "s/^([^:]+):[^:]+:${UID}:.*/\\1/p" /etc/passwd)\n\ + GROUPNAME=$(sed -rn "s/^([^:]+):[^:]+:${GID}:.*/\\1/p" /etc/group)\n\ + if [ -z "$USERNAME" ]; then\n\ + USERNAME=host-user\n\ + if [ -z "$GROUPNAME" ]; then\n\ + GROUPNAME=host-user\n\ + addgroup -g $GID host-user\n\ + fi\n\ + adduser -u $UID -G "$GROUPNAME" -D host-user\n\ + fi\n\ + sudo -u "$USERNAME" /usr/local/singularity/bin/singularity "$@"\n\ + ' > /entrypoint.sh \ + && chmod +s /usr/local/singularity/libexec/singularity/bin/starter-suid \ + && chmod +x /entrypoint.sh + +ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/scripts/Dockerfile.singularity-shim b/scripts/Dockerfile.singularity-shim index e2d50e87..3566f265 100644 --- a/scripts/Dockerfile.singularity-shim +++ b/scripts/Dockerfile.singularity-shim @@ -1,6 +1,6 @@ # no longer pushed to - vanessa declared dockerhub insecure #FROM singularityware/singularity:v3.3.0-slim -FROM quay.io/singularity/singularity:v3.7.0-slim +FROM quay.io/singularity/singularity:v3.10.0-slim RUN apk update \ && apk add bash sudo \