Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Docker
(edit)
Revision as of 08:57, 15 April 2019
128 bytes added
,
08:57, 15 April 2019
m
no edit summary
Line 95:
Line 95:
===Pull Modify Commit===
===Pull Modify Commit===
−
<source lang=bash>sudo docker pull ubuntu
+
<source lang=
"
bash
"
>sudo docker pull ubuntu
sudo docker run ubuntu apt-get install -y ping</source>
sudo docker run ubuntu apt-get install -y ping</source>
Then get the container id using this command:
Then get the container id using this command:
−
<source lang=bash>sudo docker ps -l</source>
+
<source lang=
"
bash
"
>sudo docker ps -l</source>
Commit changes to the container:
Commit changes to the container:
−
<source lang=bash>sudo docker commit <container_id> iman/ping</source>
+
<source lang=
"
bash
"
>sudo docker commit <container_id> iman/ping</source>
Then run the container:
Then run the container:
−
<source lang=bash>sudo docker run iman/ping ping www.google.com</source>
+
<source lang=
"
bash
"
>sudo docker run iman/ping ping www.google.com</source>
==Docker mirror==
==Docker mirror==
Line 125:
Line 125:
done
done
+
</syntaxhighlight>
+
+
== Run command on running container ==
+
<syntaxhighlight lang="bash">
+
docker exec -ti es01 /bin/bash
</syntaxhighlight>
</syntaxhighlight>
==Dockerfile reference==
==Dockerfile reference==
https://docs.docker.com/engine/reference/builder/
https://docs.docker.com/engine/reference/builder/
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version