Support for Docker ENTRYPOINTs

577 views
Skip to first unread message

Matt Dyer

unread,
Feb 24, 2015, 6:53:06 PM2/24/15
to next...@googlegroups.com
This is more of a feature request (or maybe I am missing an option somewhere), but it would be great to support containers that have defined entrypoints. The way that nextflow runs the container currently is by wrapping it in a shell script so it won't work.

process Foo{

     container 'Foo'


     """

     -h

     """

}


The container Foo has the entrypoint defined as 'foo' and the intent is to run 'foo -h' but when nextflow wraps things up it calls

docker run -i -v /Users/mattdyer/Documents/Programming/workflows:/Users/mattdyer/Documents/Programming/workflows -v $PWD:$PWD -w $PWD --name nxf-47cea6e1 Foo /bin/bash -ue /Users/mattdyer/Documents/Programming/workflows/.command.sh &> .command.out


Which takes the following shell script and runs it in the container.

#!/bin/bash -ue

-h


Really what I would like to is have nextflow run 

docker run -i -v /Users/mattdyer/Documents/Programming/workflows:/Users/mattdyer/Documents/Programming/workflows -v $PWD:$PWD -w $PWD --name nxf-47cea6e1 Foo -h &> .command.out

I apologize if I missed a flag that would allow this. If not, then just a feature request.

Best,
Matt

Jimmy Jia

unread,
Feb 25, 2015, 2:21:41 AM2/25/15
to next...@googlegroups.com
The motivation here is that Docker best practices generally call for treating images as applications and containers as processes, rather than VMs and environments respectively.

Given that, it seems more idiomatic to put the wrapper scripts inside the images and just docker run them with a specified set of arguments, rather than passing in a script to run within the container.

Paolo Di Tommaso

unread,
Feb 25, 2015, 9:42:02 AM2/25/15
to nextflow
Yes, the point is that a Nextflow process is supposed to execute a script, not a simple command line. 

For this reason the process code is wrapped into a script file and executed in the container when a Docker image is specified. 

However, I agree that this limits the ability of using existing containers. I'm opening a feature request to improve how Docker entrypoint is managed by Nextflow 


Cheers,
Paolo




--
You received this message because you are subscribed to the Google Groups "Nextflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/nextflow.
For more options, visit https://groups.google.com/d/optout.

Jimmy Jia

unread,
Feb 25, 2015, 11:34:10 AM2/25/15
to next...@googlegroups.com
Thanks! I think being able to integrate with application containers will make it much cleaner to wrap up applications in containers and use them as elements of a workflow.

Where do you track feature requests? Is it on GH issues?

Paolo Di Tommaso

unread,
Feb 25, 2015, 11:38:46 AM2/25/15
to nextflow
Yes, we use Github but I haven't yet created the feature request. Feel free to contribute creating it :)


p


Jimmy Jia

unread,
Feb 25, 2015, 11:43:11 AM2/25/15
to nextflow

You received this message because you are subscribed to a topic in the Google Groups "Nextflow" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nextflow/GsgQfBuuUoE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nextflow+u...@googlegroups.com.

Paolo Di Tommaso

unread,
Feb 25, 2015, 11:46:14 AM2/25/15
to nextflow
Thanks

p

Paolo Di Tommaso

unread,
Mar 23, 2015, 11:59:53 AM3/23/15
to next...@googlegroups.com
Request for comments on supporting executable containers in Nextflow 



Cheers,
p
 

Reply all
Reply to author
Forward
0 new messages