Docker Desktop: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 54: Line 54:


<font color=darkgray>However, that path is relative to the Docker VM</font>
<font color=darkgray>However, that path is relative to the Docker VM</font>
=Docker Desktop File Sharing=
{{External|https://docs.docker.com/docker-for-mac/#file-sharing}}
To expose local directories as "hostPaths" in pods deployed on Docker Desktop Kubernetes, those directories must exist under the "shared directories" declared in Preferences → Resources → File Sharing. As a special case, if we want to share files under the Mac's host /tmp, the hostPath should be /private/tmp/[...].
Also see: {{Internal|Kubernetes_Storage_Concepts#hostPath_on_single-node_Kubernetes_Clusters_.28minikube.2C_Docker_Desktop_Kubernetes.29|hostPath on single-node Kubernetes Clusters (minikube, Docker_Desktop_Kubernetes)}}


=Docker Desktop Kubernetes=
=Docker Desktop Kubernetes=

Latest revision as of 18:42, 3 March 2021

External

Internal

Overview

  • Where is the local registry stored?
  • What is "the disk image"?
  • What is /Users/ovidiu/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2

Installation and Uninstallation

Docker Mac Installation

Configuration

Docker Buildkit

Docker 19.03.13 comes with Docker buildkit enabled and that causes problems while building image - an image build fails if a base image is not cached. To disable it:

1. Set DOCKER_BUILDKIT=0

export DOCKER_BUILDKIT=0

or

2. Preferences → Docker Engine → edit "buildkit": false → Apply and Restart.

Processes

/Applications/Docker.app/Contents/MacOS/com.docker.supervisor -watchdog fd:0 -max-restarts 0 -restart-seconds 300
com.docker.osxfs serve --address fd:3 --connect /Users/ovidiu/Library/Containers/com.docker.docker/Data/connect --control fd:4
com.docker.vpnkit --ethernet fd:3 --port fd:4 --introspection fd:5 --diagnostics fd:6 --vsock-path /Users/ovidiu/Library/Containers/com.docker.docker/Data/connect --host-names docker.for.mac.localhost,docker.for.mac.host.internal --gateway-names docker.for.mac.gateway.internal,docker.for.mac.http.internal --listen-backlog 32 --mtu 1500 --allowed-bind-addresses 0.0.0.0 --http /Users/ovidiu/Library/Group Containers/group.com.docker/http_proxy.json --dhcp /Users/ovidiu/Library/Group Containers/group.com.docker/dhcp.json --port-max-idle-time 300 --max-connections 2000 --gateway-ip 192.168.65.1 --host-ip 192.168.65.2 --lowest-ip 192.168.65.3 --highest-ip 192.168.65.254 --log-destination asl
com.docker.driver.amd64-linux -addr fd:3 -debug
com.docker.hyperkit -A -u -F /Users/ovidiu/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/hyperkit.pid -c 4 -m 2048M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-vpnkit,path=/Users/ovidiu/Library/Containers/com.docker.docker/Data/s50,uuid=5b49dac5-1211-4152-ace2-9b2b5186dd40 -s 2:0,ahci-hd,file:///Users/ovidiu/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2?sync=os&buffered=1,format=qcow,qcow-config=discard=true;compact_after_unmaps=262144;keep_erased=262144;runtime_asserts=false -s 3,virtio-sock,guest_cid=3,path=/Users/ovidiu/Library/Containers/com.docker.docker/Data,guest_forwards=2376;1525 -s 4,ahci-cd,/Applications/Docker.app/Contents/Resources/linuxkit/docker-for-mac.iso -s 5,ahci-cd,/Users/ovidiu/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/database.iso -s 6,virtio-rnd -s 7,virtio-9p,path=/Users/ovidiu/Library/Containers/com.docker.docker/Data/s51,tag=port -l com1,autopty=/Users/ovidiu/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty,log=/Users/ovidiu/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/console-ring -f bootrom,/Applications/Docker.app/Contents/Resources/uefi/UEFI.fd,,

Local Volume Location

The docker volume inspect command reports the local volume mountpoint as:

/var/lib/docker/volumes/localenv_psqlvol/_data

However, that path is relative to the Docker VM

Docker Desktop File Sharing

https://docs.docker.com/docker-for-mac/#file-sharing

To expose local directories as "hostPaths" in pods deployed on Docker Desktop Kubernetes, those directories must exist under the "shared directories" declared in Preferences → Resources → File Sharing. As a special case, if we want to share files under the Mac's host /tmp, the hostPath should be /private/tmp/[...].

Also see:

hostPath on single-node Kubernetes Clusters (minikube, Docker_Desktop_Kubernetes)

Docker Desktop Kubernetes

Docker Desktop Kubernetes

Operations

Enter the Docker Desktop VM

https://www.bretfisher.com/docker-for-mac-commands-for-getting-into-local-docker-vm/

Troubleshooting

Log location: /Users/<username>/Library/Logs/Docker Desktop