HELP: docker-shell script error

Recommended Posts



I followed the instructions in SpaceInvaderOne's recent "How to easily bash into a running docker container" video, but I get the following error when I run #docker-shell 


root@SERVER:~# docker-shell
-bash: /usr/local/bin/docker-shell: /bin/bash^M: bad interpreter: No such file or directory


Has anyone seen this before or know what's causing it?





Link to comment

I ended up dealing with it by downloading his docker-shell file in the description and then copying it onto the flash disk, then using the Command Line plugin and the Custom Tab plugin to run a shell inside the unRAID GUI. I then put the go file in a share and used vi to add the cp /boot/custom/docker-shell /usr/local/bin line. Then moved the go file from the share to the flash disk and ran #cp /boot/custom/docker-shell /usr/local/bin in shell. It worked after that. I'm guessing Windows was doing something weird with line breaks... Was very annoying, but at least it's sorted out now. I hope this helps anyone else who was having this same issue!

Link to comment
10 hours ago, jackson said:

I'm guessing Windows was doing something weird with line breaks...

Perfectly normal.  Windows uses \r\n for line breaks, whereas everything else in the world uses \n.  The solution is that anything you utilize with unRaid is to save the file with Notepad++ and set it to use Unix style line endings.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.