<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Running container Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/running-container/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/running-container/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:49:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>How to get bash or ssh into a running container in background mode?</title>
		<link>https://www.scmgalaxy.com/tutorials/how-to-get-bash-or-ssh-into-a-running-container-in-background-mode/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-to-get-bash-or-ssh-into-a-running-container-in-background-mode/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Tue, 23 Feb 2016 11:51:34 +0000</pubDate>
				<category><![CDATA[CONTAINERS]]></category>
		<category><![CDATA[Background]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Container]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[mode]]></category>
		<category><![CDATA[Running container]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[SSH into a Container]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2016/02/23/how-to-get-bash-or-ssh-into-a-running-container-in-background-mode/</guid>

					<description><![CDATA[<p>How to get bash or ssh into a running container in background mode? Step 1: First of all, try to [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-get-bash-or-ssh-into-a-running-container-in-background-mode/">How to get bash or ssh into a running container in background mode?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img fetchpriority="high" decoding="async" class="wp-image-3196 size-full aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2016/02/bash-or-ssh-into-a-running-1-1.png" alt="bash-or-ssh-into-a-running-container" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2016/02/bash-or-ssh-into-a-running-1-1.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2016/02/bash-or-ssh-into-a-running-1-1-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></div>
<div><strong>How to get bash or ssh into a running container in background mode?</strong></div>
<div></div>
<div><strong>Step 1: First of all, try to find your active container by running</strong></div>
<div># docker ps</div>
<div>or</div>
<div># docker ps -a</div>
<div></div>
<div><strong>Step 2: If the container is not running,</strong></div>
<div># docker start your_id</div>
<div></div>
<div><strong>Step 3: If we use attach we can use only one instance of shell.</strong></div>
<div># sudo docker attach 665b4a1e17b6 #by ID</div>
<div>or</div>
<div># sudo docker attach loving_heisenberg #by Name</div>
<div></div>
<div>If we want open new terminal with new instance of container&#8217;s shell, we just need run the following:</div>
<div># sudo docker exec -i -t 2e56ad1705b1 /bin/bash #by ID</div>
<div>or</div>
<div># sudo docker exec -i -t loving_heisenberg /bin/bash #by Name</div>
<div># root@665b4a1e17b6:/#</div>
<div></div>
<div><strong>Step 4: To exit bash without leaving bash running in a rogue process</strong></div>
<div># exit</div>
<div></div>
<div><strong>Notes:</strong></div>
<div>A reminder for boot2docker users: remove sudo</div>
<div>If you are using docker in Linux, you will have to use sudo along with docker commands.</div>
<div>You should try not to run commands as sudo, rather add your user to the docker group and just run normally.</div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-get-bash-or-ssh-into-a-running-container-in-background-mode/">How to get bash or ssh into a running container in background mode?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-to-get-bash-or-ssh-into-a-running-container-in-background-mode/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
