Error: I have no name! occurs when trying to run ~$ sudo docker run --volume

Thanks for that rimelek, so no need to have a username set up in the debian container.

I used the following command

computername:~/nextflow/pipelines/docker_training/docker_training_b11_slp338_r16$ docker run --volume $HOME:$HOME --workdir ${PWD} -u $(id -u):$(id -g) -it nano_tools_debian

which returned

I have no name!@77cfee7fe3d7:/home/name/nextflow/pipelines/docker_training/docker_training_b11_slp338_r16$ ls
AIG357_pass_barcode11_d46709a9_0.fastq	docker_nanoplot_output	sequencing_summary_AIG357_d46709a9.txt

So I know that the pwd that I’m in on my host has mounted correctly into the debian container, and that the container can see the files that need to be analysed. But it will not run the NanoPlot command in the Dockerfile.

I then used

~$ sudo docker rmi nano_tools_debian

to remove the container and start again with

computername:~/nextflow/pipelines/docker_training/docker_training_b11_slp338_r16$ sudo docker build -t nano_tools_debian .

to build the container again.
The container build finished without any errors.

computername:~/nextflow/pipelines/docker_training/docker_training_b11_slp338_r16$ sudo docker image history nano_tools_debian
IMAGE          CREATED          CREATED BY                                      SIZE      COMMENT
54534dcdaf09   25 minutes ago   /bin/sh -c cd minimap2 && make                  5.5MB     
481941094c15   25 minutes ago   /bin/sh -c git clone https://github.com/lh3/…   2.76MB    
e9d8f016d99d   27 minutes ago   /bin/sh -c pip install pycoQC                   82.4MB    
d43d0b163cc2   33 minutes ago   /bin/sh -c apt-get -y install git               44.9MB    
96c1f4cab101   34 minutes ago   /bin/sh -c apt-get -y install curl              3.65MB    
fbcfa2fb50e5   34 minutes ago   /bin/sh -c pip install NanoPlot --upgrade       56.3kB    
4ec7e4709ddf   34 minutes ago   /bin/sh -c pip install NanoPlot                 810MB     
901fedd9c902   48 minutes ago   /bin/sh -c pip install nanofilt                 160MB     
acd0f3339d95   49 minutes ago   /bin/sh -c apt-get -y install python3-pip       378MB     
42da5db31614   55 minutes ago   /bin/sh -c apt update && apt upgrade            17.7MB    
0c1c1ca57df3   56 minutes ago   /bin/sh -c #(nop)  MAINTAINER <naqsdarwin>      0B        
827e5611389a   7 days ago       /bin/sh -c #(nop)  CMD ["bash"]                 0B        
<missing>      7 days ago       /bin/sh -c #(nop) ADD file:5259fc086e8295ddb…   124MB   



I then removed the comment from Run NanoPlot in the dockerfile (below) and used

computername:~/nextflow/pipelines/docker_training/docker_training_b11_slp338_r16$ docker run --volume $HOME:$HOME --workdir ${PWD} -u $(id -u):$(id -g) -it nano_tools_debian

but with the same result as above.

I have no name!@77cfee7fe3d7:/home/name/nextflow/pipelines/docker_training/docker_training_b11_slp338_r16$ ls
AIG357_pass_barcode11_d46709a9_0.fastq	docker_nanoplot_output	sequencing_summary_AIG357_d46709a9.txt

I’m not sure why the files are in the container but the container wont run the NanoPlot command.

Any help would be greatly appreciated.
I’m will also edit the name of this thread if you think the name is not suitable.

FROM debian

MAINTAINER <naqsdarwin>

RUN apt update && apt upgrade

RUN apt-get -y install python3-pip

RUN pip install nanofilt

RUN pip install NanoPlot

RUN pip install NanoPlot --upgrade

RUN apt-get -y install curl

RUN apt-get -y install git

RUN git clone https://github.com/lh3/minimap2

RUN cd minimap2 && make

RUN pip install pycoQC
#https://tleonardi.github.io/pycoQC/installation/

#----------------------------------------------------------------------

# The above completes the building of the container
# The below is now using the programs to anaylse data

#----------------------------------------------------------------------

# Nanoplot

RUN NanoPlot --threads 16 --tsv_stats --summary ~/nextflow/pipelines/docker_training/docker_training_b11_slp338_r116/sequencing_summary.txt ---plots hex dot --N50 --title SLP338 --outdir ~/nextflow/pipelines/docker_training/docker_training_b11_slp338_r16/docker_nanoplot_output/ 

#----------------------------------------------------------------------

# NanoFilt

#RUN cd ~/nextflow/pipelines/docker_training/docker_training_B11_SLP338_R16

#RUN gzip -c AIG*.fastq > docker_training.gz

#RUN gunzip -c docker_training.gz | NanoFilt --headcrop 30 --tailcrop 30

#----------------------------------------------------------------------