Skip to content
Snippets Groups Projects
Commit ff2f5de3 authored by Peng Lian's avatar Peng Lian
Browse files

Add Singularity container

parent abf9e212
No related merge requests found
FROM golang:1.13.15-alpine3.12
LABEL CONTAINER_VERSION="0.0.1" \
AUTHOR="Peng Lian" \
EMAIL="biohpc-help@utsouthwestern.edu"
# build-time varialbes
ARG http_proxy="http://proxy.swmed.edu:3128/"
ARG https_proxy="http://proxy.swmed.edu:3128/"
ARG no_proxy="*.swmed.edu,*.swmed.org,*.utsouthwestern.edu,localhost,127.0.0.1/8"
ENV http_proxy="${http_proxy}" \
https_proxy="${https_proxy}" \
no_proxy="${no_proxy}" \
SINGULARITY_VERSION="3.5.3"
# alpine image with the go tools
RUN apk update && \
apk add --virtual automake build-base linux-headers libffi-dev
RUN apk add --no-cache bash \
git \
openssh \
gcc \
squashfs-tools \
sudo \
libtool \
gawk \
cryptsetup \
linux-headers \
build-base \
openssl-dev \
util-linux \
util-linux-dev \
shadow-uidmap
RUN mkdir -p /usr/local/var/singularity/mnt && \
mkdir -p $GOPATH/src/github.com/sylabs && \
cd $GOPATH/src/github.com/sylabs && \
git clone https://github.com/sylabs/singularity.git && \
cd singularity && \
git checkout v${SINGULARITY_VERSION} && \
./mconfig -p /usr/local && \
make -C builddir && \
make -C builddir install
RUN apk del automake libtool m4 autoconf alpine-sdk linux-headers
ENTRYPOINT ["/usr/local/bin/singularity"]
FROM golang:1.17.12-alpine3.16
LABEL CONTAINER_VERSION="0.0.1" \
AUTHOR="Peng Lian" \
EMAIL="biohpc-help@utsouthwestern.edu"
# build-time varialbes
ARG http_proxy="http://proxy.swmed.edu:3128/"
ARG https_proxy="http://proxy.swmed.edu:3128/"
ARG no_proxy="*.swmed.edu,*.swmed.org,*.utsouthwestern.edu,localhost,127.0.0.1/8"
ENV http_proxy="${http_proxy}"
ENV https_proxy="${https_proxy}"
ENV no_proxy="${no_proxy}"
ENV SINGULARITY_VERSION="3.9.8"
# alpine image with the go tools
RUN apk update && \
apk add --virtual automake build-base linux-headers libffi-dev
RUN apk add --no-cache bash \
git \
openssh \
gcc \
squashfs-tools \
sudo \
libtool \
gawk \
cryptsetup \
linux-headers \
build-base \
openssl-dev \
util-linux \
util-linux-dev \
shadow-uidmap
RUN mkdir -p /usr/local/var/singularity/mnt && \
mkdir -p $GOPATH/src/github.com/sylabs && \
cd $GOPATH/src/github.com/sylabs && \
git clone https://github.com/sylabs/singularity.git && \
cd singularity && \
git checkout v${SINGULARITY_VERSION} && \
./mconfig --without-suid -p /usr/local && \
export http_proxy="http://proxy.swmed.edu:3128/" && \
export https_proxy="http://proxy.swmed.edu:3128/" && \
make -C builddir && \
sudo make -C builddir install
RUN apk del automake libtool m4 autoconf alpine-sdk linux-headers
ENTRYPOINT ["/usr/local/bin/singularity"]
#!/bin/bash
PACKAGE="singularity"
VERSION="3.9.8"
CONTAINER_TAG="${PACKAGE}:${VERSION}"
CONTAINER_NAME="git.biohpc.swmed.edu:5050/biohpc/astrocyte-container-images/${CONTAINER_TAG}"
DOCKER_USERNAME="docker-push"
DOCKER_PASSWORD="AA4KRFCeEg8XSmwyoaAN"
export DOCKER_BUILDKIT=0
export COMPOSE_DOCKER_CLI_BUILD=0
# build with proxy settings
docker build \
-f ./${VERSION}/Dockerfile \
-t ${CONTAINER_TAG} \
./${VERSION}
# Tag and push
docker tag ${CONTAINER_TAG} ${CONTAINER_NAME}
docker login git.biohpc.swmed.edu:5050 -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}
docker push ${CONTAINER_NAME}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment