Changes

Jump to navigation Jump to search
27 bytes added ,  14:42, 25 March 2019
m
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==

Navigation menu