-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker shim: Boost singlarity to 3.10.0 - have dedicated one for arm6…
…4 (Mac M1) See #67
- Loading branch information
1 parent
622724e
commit 5c40ed1
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters