Skip to content

Let's automate to get in a docker container to make it easier by selecting its name.

License

Notifications You must be signed in to change notification settings

yahyaerturan/docker-ssh-automator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

docker-ssh-automator

Let's automate to get in a docker container to make it easier by selecting its name.

Step 1 First create a bin directory at your user folder on your host machine (if not exists) and then export path to your .bashrc. Simply you can copy the below line and run it on your terminal:

cd ~;mkdir -p bin;echo "export PATH=$PATH:$HOME/bin" >> .bashrc

Of course you can do it manually too.

Step 2 Copy docker-ssh file to your ~/bin folder.

Step 3 Make the file executable by and then source the .bashrc file:

chmod a+x ~/bin/docker-ssh
source ~/.bashrc

Done!

Now you can easily call

docker-ssh

..from anywhere you like. It will list the container names and ask you to select which one you want to get in by /bin/bash entrypoint.

Preview

Please note Docker should be running in your system and you should have running containers to list them :)

Enjoy...

About

Let's automate to get in a docker container to make it easier by selecting its name.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages