vimwiki/tech/Docker.wiki

39 lines
772 B
Plaintext
Raw Normal View History

2021-11-24 02:30:01 +00:00
= Docker =
Docker is a tool for containerizing (basically VM'ing) programs
== Install ==
On gentoo install docker as directed, and enable all of the required flags on
the wiki (they change with different versions)
== Setup ==
the `docker` command is all thats needed to run a container.
2022-01-18 22:15:01 +00:00
2022-05-09 23:00:01 +00:00
== docker-compose ==
Docker-compose allows you to automate setting up several containers into a
2022-07-31 00:00:01 +00:00
single command.
2022-05-09 23:15:01 +00:00
=== ports ===
* expose a port in the container to the world
* below binds port 8080 of the container to reply to any IP on the host at port
80
{{{
ports:
- 0.0.0.0:80:8080/tcp
}}}
=== volumes ===
* mount a folder on the filesystem inside the container
2022-01-18 22:15:01 +00:00
== Useful commands ==
=== Get a shell on a container ===
`docker exec -it <CONTAINER_ID> /bin/bash`