Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Aphorismen
Applications
Business Economics & Admin.
My Computers
Cooking
Devices
Folders
Food
Hardware
Infos
Software Development
Sports
Operation Instructions
Todos
Test
Help
Glossary
Community portal
adaptions
Sidebar anpassen
Wiki RB4
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Docker
(section)
Page
Discussion
English
Read
Edit
View history
Toolbox
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Docker=== // general options -H=<REMOTE_DOCKER_ENGINE>:<PORT> // e.g. docker -H=<IP>:<PORT> run nginx docker build [--tag <IMAGE_NAME>] . // uses the file 'Dockerfile' in the actual directory and creates an image named <IMAGE_NAME> docker container ls docker exec // e.g. docker exec -it <CONTAINER_ID> bash docker image (ls | prune | remove <IMAGE_NAME>) docker images // lists all images docker inspect <CONTAINER_NAME> docker logs <CONTAINER_NAME> // shows log of the container docker network create <NETWORK_NAME> docker network ls docker network inspect bridge // show details for the default network 'bridge' docker pull <IMAGE> // e.g. docker pull mysql/mysql-server:latest docker ps [<OPTIONS>] // lists all running containers // -a all e.g. all containers in exited state docker restart <CONTAINER_ID> // eg. docker restart d4 docker rm <CONTAINER_NAME> docker rmi <IMAGE_NAME> // deletes an image docker run [<[https://docs.docker.com/engine/reference/commandline/run/ RUN_OPTIONS]>] <IMAGE_NAME>:<TAG> [<COMMANDS>] [<ARGS>] // runs an image // RUN_OPTIONS are: // --cpus=<NUMBER> // -d detach, run in background // -e <ENV_VARIABLE_NAME>=<VALUE> // --entrypoint <OVERWRITTEN_ENTRYPOINT> // -i use stdin // --link <CONTAINER_REF>:<CONTAINER_NAME> // --memory=<AMOUNT> // --mount type=bind,source=<HOST_DIR>,target=<CONTAINER_DIR> // moderne volume mounting // --name <NAME> // --network=<NETWORK_NAME> // -p <HOST_PORT_NUMBER>:<CONTAINER_PORT_NUMBER> // -rm // to remove the container after it has executed // -t attach terminal // -v <VOLUME_NAME>:<CONTAINER_DIR>, <VOLUME_NAME> is located in /var/lib/docker/volumes/... of the host file system, this is called volume mounting // -v <HOST_DIR>:<CONTAINER_DIR>, this is called bind mounting // <TAG> can be a version number, default is 'latest' // <COMMANDS> overwrite the CMD of the docker file // // e.g. docker run --name=TestMySQL -d mysql/mysql-server:latest docker start docker stop <CONTAINER_NAME> docker system prune // removes all stopped container, unused container, dangling images, dangling build cache docker volume (create | ls | rm | prune | β¦) // /var/lib/docker/volumes/<VOLUME_NAME>
Summary:
Please note that all contributions to Wiki RB4 may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Uwe Heuer Wiki New:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width