Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Docker
(edit)
Revision as of 14:42, 25 March 2019
27 bytes added
,
14:42, 25 March 2019
m
→Create & Publish image
Line 63:
Line 63:
nano rpi_python/Dockerfile</source>
nano rpi_python/Dockerfile</source>
−
Docekerfile
+
==
Docekerfile
==
<source lang="dockerfile"># Pull base image
<source lang="dockerfile"># Pull base image
FROM resin/rpi-raspbian:wheezy
FROM resin/rpi-raspbian:wheezy
Line 97:
Line 97:
<nowiki>210
<nowiki>210
−
down vote
+
down vote
−
accepted
+
accepted
−
+
−
+
−
You need to commit the changes you make to the container and then run it. Try this:
+
You need to commit the changes you make to the container and then run it. Try this:
−
+
−
sudo docker pull ubuntu
+
sudo docker pull ubuntu
−
+
−
sudo docker run ubuntu apt-get install -y ping
+
sudo docker run ubuntu apt-get install -y ping
−
+
−
Then get the container id using this command:
+
Then get the container id using this command:
−
+
−
sudo docker ps -l
+
sudo docker ps -l
−
+
−
Commit changes to the container:
+
Commit changes to the container:
−
+
−
sudo docker commit <container_id> iman/ping
+
sudo docker commit <container_id> iman/ping
−
+
−
Then run the container:
+
Then run the container:
−
+
−
sudo docker run iman/ping ping www.google.com</nowiki>
+
sudo docker run iman/ping ping www.google.com</nowiki>
==Docker mirror==
==Docker mirror==
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