Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to bash into a docker container

trying to bash into container and do a for loop which simply performs a command (which works on a single file by the way). it even seems to echo the right command...what did I forget Untitled

for pdf in *.pdf ;
do 
 docker run --rm -v "$(pwd):/home/docker" leofcardoso/pdf2pdfocr -g jpeg2000 -v -i '\'''$pdf''\''';
done
like image 222
Daniel Alexander Lowes Avatar asked Oct 09 '19 11:10

Daniel Alexander Lowes


1 Answers

You can bash in a container with this commands:

To see the docker container id

docker container ls 

To enter in bash inside a container.

docker exec -it CONTAINER_ID bash
like image 112
Carlos Alberto P. Moura Jr. Avatar answered Oct 02 '22 22:10

Carlos Alberto P. Moura Jr.