Skip to content

Commit

Permalink
docker shim: Boost singlarity to 3.10.0 - have dedicated one for arm6…
Browse files Browse the repository at this point in the history
…4 (Mac M1)

See #67
  • Loading branch information
yarikoptic committed May 23, 2022
1 parent 622724e commit 5c40ed1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions scripts/Dockerfile.singularity-arm64-shim
Original file line number Diff line number Diff line change
@@ -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" ]
2 changes: 1 addition & 1 deletion scripts/Dockerfile.singularity-shim
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down

0 comments on commit 5c40ed1

Please sign in to comment.