Here is a quick guide to using Docker. See also:
- Quick guide to GNUPlot
- Quick guide to n8n
- Quick guide to NSCC ASPIRE2A
- Quick guide to CVS
- Quick guide to nawk
- Quick guide to Emacs
- Quick guide to Git
From: https://docs.docker.com/docker-for-windows/#docker-settings-dialog
Printing the version
docker --version
Testing the installation
docker run hello-world
Listing the images
docker image ls
Listing all the containers
docker container ls --all
Other help
> docker --help
> docker container --help
> docker container ls --help
> docker run --help
Pull an image of the Ubuntu OS and run an interactive terminal inside the spawned container:
docker run --interactive --tty ubuntu bash
Pull and run a Dockerized nginx web server that we name, webserver:
docker run --detach --publish 80:80 --name webserver nginx
You can now point your browser to http://localhost and see that the nginx welcome page is loaded.
List only your running containers:
docker container ls
Stop the running nginx container by the name we assigned it, webserver:
docker container stop webserver
Start a container that was stopped/exited previously:
docker start webserver
Attached to a running container, webserver:
docker attach webserver
Exit from an interactive session of a container, webserver without stopping it:
Press CTRL-P followed by CTRL-Q
Remove all containers by its name:
docker container rm webserver
The following common starts an interactive ash command line session for the docker image alpine-npm, maps the internal port 3000 to the host port 3000, set the number of cpus allocated to 10, gives it a name “react”, and automatically removes the image upon exit:
docker run -p 3000:3000 -cpus 10 -it --name react --rm alpine-npm /bin/ash
See the following page on how to display applications onto your Windows 10.
https://dev.to/darksmile92/run-gui-app-in-linux-docker-container-on-windows-host-4kde