add nextflow d30e48d
This commit is contained in:
19
nextflow/docker/Dockerfile
Normal file
19
nextflow/docker/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM amazoncorretto:21-al2023
|
||||
RUN yum install -y procps-ng shadow-utils which
|
||||
|
||||
ENV NXF_HOME=/.nextflow
|
||||
ARG TARGETPLATFORM=linux/amd64
|
||||
|
||||
# copy docker client
|
||||
COPY dist/${TARGETPLATFORM}/docker /usr/local/bin/docker
|
||||
COPY entry.sh /usr/local/bin/entry.sh
|
||||
COPY nextflow /usr/local/bin/nextflow
|
||||
|
||||
# download runtime
|
||||
RUN mkdir /.nextflow \
|
||||
&& chmod 755 /usr/local/bin/nextflow \
|
||||
&& chmod 755 /usr/local/bin/entry.sh \
|
||||
&& nextflow info
|
||||
|
||||
# define the entry point
|
||||
ENTRYPOINT ["/usr/local/bin/entry.sh"]
|
||||
45
nextflow/docker/Makefile
Normal file
45
nextflow/docker/Makefile
Normal file
@@ -0,0 +1,45 @@
|
||||
#
|
||||
# Copyright 2013-2024, Seqera Labs
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
version ?= none
|
||||
|
||||
build: dist/docker/amd64
|
||||
cp ../nextflow .
|
||||
docker buildx build --platform linux/amd64 --output=type=docker --progress=plain --tag nextflow/nextflow:${version} --build-arg TARGETPLATFORM=linux/amd64 .
|
||||
|
||||
build-arm: dist/docker/arm64
|
||||
cp ../nextflow .
|
||||
docker buildx build --platform linux/arm64 --output=type=docker --progress=plain --tag nextflow/nextflow:${version} --build-arg TARGETPLATFORM=linux/arm64 .
|
||||
|
||||
release: build
|
||||
docker push nextflow/nextflow:${version}
|
||||
#
|
||||
docker tag nextflow/nextflow:${version} public.cr.seqera.io/nextflow/nextflow:${version}
|
||||
docker push public.cr.seqera.io/nextflow/nextflow:${version}
|
||||
|
||||
#Static builds can now be found at:
|
||||
#
|
||||
# Linux: https://download.docker.com/linux/static
|
||||
# MacOS: https://download.docker.com/mac/static
|
||||
# Windows: https://download.docker.com/win/static
|
||||
|
||||
dist/docker/amd64:
|
||||
mkdir -p dist/linux/amd64
|
||||
curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-19.03.15.tgz | tar --strip-components=1 -xvz -C dist/linux/amd64
|
||||
|
||||
dist/docker/arm64:
|
||||
mkdir -p dist/linux/arm64
|
||||
curl -fsSL https://download.docker.com/linux/static/stable/aarch64/docker-19.03.15.tgz | tar --strip-components=1 -xvz -C dist/linux/arm64
|
||||
|
||||
62
nextflow/docker/entry.sh
Executable file
62
nextflow/docker/entry.sh
Executable file
@@ -0,0 +1,62 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright 2013-2026, Seqera Labs
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
#
|
||||
# This script acts as a pass-through container entry point. Its main role
|
||||
# is to create a user able to execute docker commands from the container
|
||||
# connecting to the host docker socket at runtime.
|
||||
#
|
||||
# The invoker needs to pass the user ID using the variable NXF_USRMAP.
|
||||
# When this variable is defined, it creates a new user in the container
|
||||
# with such ID and adds it to the `docker` group, then assigns the docker
|
||||
# socket file ownership to that user.
|
||||
#
|
||||
# Finally it switches the `nextflow` user using the `su` command and
|
||||
# executes the original target command line.
|
||||
#
|
||||
# authors:
|
||||
# Paolo Di Tommaso
|
||||
# Emilio Palumbo
|
||||
#
|
||||
|
||||
# enable debugging
|
||||
[[ "$NXF_DEBUG_ENTRY" ]] && set -x
|
||||
|
||||
# wrap cli args with single quote to avoid wildcard expansion
|
||||
cli=''; for x in "$@"; do cli+="'$x' "; done
|
||||
|
||||
# the NXF_USRMAP hold the user ID in the host environment
|
||||
if [[ "$NXF_USRMAP" ]]; then
|
||||
# create a `nextflow` user with the provided ID
|
||||
groupadd docker
|
||||
useradd -u "$NXF_USRMAP" -G docker -s /bin/bash nextflow
|
||||
|
||||
# then change the docker socket ownership to `nextflow` user
|
||||
# and change the $NXF_HOME ownership to `nextflow` user
|
||||
chown nextflow /var/run/docker.sock
|
||||
chown -R nextflow /.nextflow
|
||||
|
||||
# finally run the target command with `nextflow` user
|
||||
su nextflow << EOF
|
||||
[[ "$NXF_DEBUG_ENTRY" ]] && set -x
|
||||
exec bash -c "$cli"
|
||||
EOF
|
||||
|
||||
# otherwise just execute the command
|
||||
else
|
||||
exec bash -c "$cli"
|
||||
fi
|
||||
8
nextflow/docker/flux/README.md
Normal file
8
nextflow/docker/flux/README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Flux Container Environment
|
||||
|
||||
In this directory we include a [Dockerfile](.devcontainer/Dockerfile)
|
||||
along with a [VSCode Developer Container](https://code.visualstudio.com/docs/devcontainers/containers)
|
||||
environment that you can put at the root of the project to be provided with a Flux agent and the dependencies
|
||||
needed to build Nextflow. See the [documentation](https://www.nextflow.io/docs/latest/flux.html)
|
||||
for the latest for how to use them.
|
||||
|
||||
Reference in New Issue
Block a user