Changes

Jump to navigation Jump to search
164 bytes removed ,  14:45, 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 83: Line 83:  
CMD ["bash"]</source>
 
CMD ["bash"]</source>
   −
<source lang=bash>docker build -t DOCKER_HUB_USERNAME/rpi_python:0.0.1 .
+
<source lang="bash">docker build -t DOCKER_HUB_USERNAME/rpi_python:0.0.1 .
 
# Or with multiple tags
 
# Or with multiple tags
 
docker build -t DOCKER_HUB_USERNAME/rpi_python:0.0.1 -t DOCKER_HUB_USERNAME/rpi_python:latest .
 
docker build -t DOCKER_HUB_USERNAME/rpi_python:0.0.1 -t DOCKER_HUB_USERNAME/rpi_python:latest .
Line 96: Line 96:  
===Pull Modify Commit===
 
===Pull Modify Commit===
   −
  <nowiki>210
+
 
    down vote
+
  sudo docker pull ubuntu
    accepted
+
     
   
+
sudo docker run ubuntu apt-get install -y ping
   
+
     
    You need to commit the changes you make to the container and then run it. Try this:
+
 
   
+
Then get the container id using this command:
    sudo docker pull ubuntu
+
     
   
+
      sudo docker ps -l
    sudo docker run ubuntu apt-get install -y ping
+
     
   
+
Commit changes to the container:
    Then get the container id using this command:
+
     
   
+
      sudo docker commit <container_id> iman/ping  
    sudo docker ps -l
+
     
   
+
Then run the container:
    Commit changes to the container:
+
     
   
+
      sudo docker run iman/ping ping www.google.com
    sudo docker commit <container_id> iman/ping  
  −
   
  −
    Then run the container:
  −
   
  −
    sudo docker run iman/ping ping www.google.com</nowiki>
      
==Docker mirror==
 
==Docker mirror==

Navigation menu