Skip to content

Instantly share code, notes, and snippets.

@SamStudio8
Created March 30, 2020 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SamStudio8/83dedab64d3f6dc892da283a9c141b43 to your computer and use it in GitHub Desktop.
Save SamStudio8/83dedab64d3f6dc892da283a9c141b43 to your computer and use it in GitHub Desktop.
RAMPART + docker + gridion
#!/bin/bash
USER_ID=${LOCAL_USER_ID:-9001}
echo "starting with UID : $USER_ID"
echo "creating RAMPART user"
useradd --shell /bin/bash -u $USER_ID -o -c "" -m rampart
echo "raising RAMPART on $CLIENT $SERVER"
gosu rampart bash -c 'cd /data && /opt/rampart/rampart.js --verbose --clearAnnotated --protocol /opt/artic-ncov2019/rampart/ --basecalledPath /data/fastq_pass --ports $CLIENT $SERVER'
#!/bin/bash
sudo docker run -it -e LOCAL_USER_ID=`id -u $USER` --mount type=bind,source="$(pwd)",target=/data/ --mount type=bind,source=/PATH/TO/override_docker_workflow.sh,target=/opt/docker_workflow.sh -p $1:$1 -p $2:$2 -e CLIENT=$1 -e SERVER=$2 ontresearch/artic_rampart:0.1.1
@sagrudd
Copy link

sagrudd commented Mar 30, 2020

Hei Sam - adding these thoughts to the current docker ... the container only exposes 3001 and 3000 by default - would you like any other docker ports exposed to the host?

@SamStudio8
Copy link
Author

Hey @sagrudd! Thanks for taking a look. It seems the -p $1:$1 -p $2:$2 bit in my raise_rampart.sh can open the ports as needed, so you shouldn't need to alter anything else in the container!

@sagrudd
Copy link

sagrudd commented Mar 30, 2020

Cool - I'll test a little and comment further in a bit -

@sagrudd
Copy link

sagrudd commented Mar 30, 2020

I have pushed ontresearch/artic_rampart:0.1.2 to docker hub - this includes these changes and a little subtle handling to encourage backwards compatibility with the previous command line for those users who have already scripted their workflows

I will build the corresponding MinIT image and push that too - will tag both with :latest tomorrow?

Would welcome any feedback - cheers - S

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment