User Tools

Site Tools


docker:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docker:start [2023/12/26 15:50]
dwheele [Cheat Sheet]
docker:start [2023/12/26 18:59] (current)
dwheele [Cheat Sheet]
Line 14: Line 14:
 ^docker logs foo|Shows the standard in/out from container that has run in the background| ^docker logs foo|Shows the standard in/out from container that has run in the background|
 ^docker image ls|List all images that are present/cached| ^docker image ls|List all images that are present/cached|
 +^docker rm foo|Remove container|
 +^docker inspect foo|Inspect container - shows network|
 +^docker network ls|Shows networks|
 +^docker run <image> <command>|Load and run a container|
 +^docker search <image>|Search for image in docker repository|
 +^docker build . -t serve_image |Build a docker image from a Dockerfile in the current directory|
 +^docker run -p 3001:3000 --name=serve_container serve_image|Run the image, mapping the internal port 3000 from "serve" to the parent host 3001, running serve_Image in a new container called "serve_container"|
 +
 +
 +
 +
 +===== Troubleshooting =====
 +
 +==== network is unreachable ====
 +
 +when trying to run
 +<code bash>
 +docker run hello-world
 +</code>
 +
 +Kept getting:
 +
 +<code>
 +connect: network is unreachable
 +</code>
 +
 +Solved problem by changing /etc/resolv.conf to
 +<code>
 +nameserver 8.8.8.8
 +</code>
 +
 +Perhaps the usual 192.168.0.1 nameserver can't properly handle the docker registry server. Which is:
 +
 +<code text>
 +https://registry-1.docker.io/v2/library/hello-world/manifests/sha256:ac69084025c660510933cca701f615283cdbb3aa0963188770b54c31c8962493
 +</code>
 +
 +
 +
 +[12/26/2023]
 +
  
docker/start.1703605858.txt.gz · Last modified: 2023/12/26 15:50 by dwheele