Docker

This reference page is managed by StJohn Piano.

Docker

This reference page is managed by StJohn Piano.

If you have any questions, comments, corrections, or suggestions - please contact StJohn Piano on Tela:
tela.app/id/stjohn_piano/7c51a6


Docker Desktop


https://www.docker.com/blog/the-magic-behind-the-scenes-of-docker-desktop

  • Under the hood, Docker Desktop contains a lightweight LinuxKit VM.
  • This VM is where a) all of Docker Desktop's Linux tools will run and is b) where all of the Docker containers will run.
  • On Windows this VM runs on WSL2. On Mac, it runs on a HyperKit implementation. On newer Mac Intel and M1 machines, it runs under Apple’s Virtualization framework.
  • Docker Desktop contains a graphical interface to manage the settings for this VM.
  • You don’t need to "go into a VM" to use Docker. Instead it works natively on your local machine. This is achieved through integrations in both networking and the file system into the VM.
  • Networking: Docker Desktop maps your local host ports to those in the VM, meaning that you can run a container on port 80 on the VM and be able to access that from the browser on your local host.
  • Filesystem: Docker Desktop sets up bind mounts from your host to the VM giving you access to your local files inside the VM.

Environment variables: When you first run an image, there will be an option to set the relevant environment variables. Example: When you run the image postgres:14-alpine, click the "Optional Settings" dropdown, and you'll be able to add environment variables for POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB. You'll also be able to set the port e.g. 5432. Note: You can't change these values for an existing container, only for a new one.

https://docs.docker.com/desktop