REPLACING DOCKER DESKTOP WITH VMWARE FUSION OR WORKSTATION
Just recently Docker announced some new pricing tiers for it’s almost ubiquitous Docker Desktop. I’m not going to opine much on this, time will tell whether this is a company saving move or not. Suffice to say that I work for a large company and would need a subscription to continue using Docker Desktop.
So @docker has a new monetization strategy that's definitely innovative. "Docker Desktop requires you pay them if you're at a large company," which they define as over $10 million in revenue or 250 employees.https://t.co/FIV7W0bZw5— Corey Quinn (@QuinnyPig) August 31, 2021
Do I need Docker Desktop?
This is an important question. I actually don’t use many of Docker Desktop’s features, I rarely use the UI short of rebooting the VM and adjusting it’s memory allocation when I use KIND.
I already have VMware Fusion running on my Macbook Pro, and I can have a CentOS docker host configured as a VM locally, so I can target the
docker CLI to use my local docker host and pretty much carry on as usual. The downside of this is that I have to download and install the pre-compiled Docker binary for MacOS, and maintain my docker host VM, which includes patching, updates, configuration etc.
Luckily, I remembered that Fusion (and Workstation) now ships with support for containers through the
vctl is a pretty much drop in replacement for
docker (so much so that I’ve created an alias
alias docker=vctl) with the added benefit that Fusion is responsible for the management of a lightweight virtual machine (the CRX VM) to host containers.
Add to that the fact that
vctl also supports deploying KIND (Kubernetes-in-Docker) to a CRX VM, and we’ve got a seriously useful tool here!
Getting started with
Assuming that you’ve got Fusion or Workstation installed, getting started with
vctl is pretty easy. You can just run
vctl system start (or configure the resources for the CMX VMs using the
vctl system config commands).
From there, you can use
vctl commands like you would
docker - as I mentioned before, I have created an alias
alias docker=vctl, so the following commands could be using
1# Pull the latest NGINX image 2vctl pull nginx 3INFO Pulling from index.docker.io/library/nginx:latest 4─── ────── ──────── 5REF STATUS PROGRESS 6─── ────── ──────── 7index-sha256:4d4d96ac750af48c6a551d757c1cbfc071692309b491b70b2b8976e102dd3fef Done 100% (1862/1862) 8manifest-sha256:5e95e5eb8be4322e3b3652d737371705e56809ed8b307ad68ec59ddebaaf60e4 Done 100% (1570/1570) 9layer-sha256:b86f2ba62d17b165964516228297d3ba669d60b6a283b5fd7779b27d7ec33871 Done 100% (1394/1394) 10layer-sha256:e21006f71c6fb784a76159590b6ba8ab3fb22e5026f67abcf5feb8e4231837d6 Done 100% (26596486/26596486) 11layer-sha256:e1acddbe380c63f0de4b77d3f287b7c81cd9d89563a230692378126b46ea6546 Done 100% (27145985/27145985) 12config-sha256:dd34e67e3371dc2d1328790c3157ee42dfcae74afffd86b297459ed87a98c0fb Done 100% (7732/7732) 13layer-sha256:f3341cc17e586daa9660abf087f13b2eba247bcf6646ee972e85d4cbaf18dbae Done 100% (603/603) 14layer-sha256:12455f71a9b5e0c207a601fb32bcf7f10a933d7193574d968409bbc5c2d89fe0 Done 100% (666/666) 15layer-sha256:2a53fa598ee20ad436f2f9da7c0a21cce583bd236f47828895d771fb2e8795e1 Done 100% (894/894) 16INFO Unpacking nginx:latest... 17INFO done 18 19# View the images available locally 20vctl images 21──── ───────────── ──── 22NAME CREATION TIME SIZE 23──── ───────────── ──── 24nginx:latest 2021-09-01T17:33:12+01:00 51.3 MiB 25sammcgeown/codestream-ci-tkg:latest 2021-09-01T16:16:19+01:00 1.2 GiB 26sammcgeown/codestream-ci:latest 2021-09-01T16:14:52+01:00 188.9 MiB 27 28# Run an NGINX instance that hosts the local directory 29vctl run -v $(pwd):/usr/share/nginx/html:ro -d -p 8080:80 nginx 30INFO container nginx-cff5 started and detached from current session 31 32# Exec to run commands in the container 33docker exec -it nginx-cff5 /bin/bash 34[email protected]:/# uname -a 35Linux nginx-cff5 4.19.138-7.ph3-esx 1-photon SMP Thu Aug 27 20:40:23 UTC 2020 x86_64 GNU/Linux 36[email protected]:/# exit 37exit 38 39# Stop and delete the VM 40vctl stop nginx-cff5 && vctl rm nginx-cff5 41INFO container nginx-cff5 has been stopped 42──── ────── ────── 43NAME RESULT REASON 44──── ────── ────── 45nginx-cff5 REMOVED
Using KIND with
Creating a KIND cluster with
vctl is, again, a trivial thing. You can configure memory and CPU with the
vctl system config commands, or go with the defaults. Running
vctl kind configures an alias for
docker so that
kind cluster create will use
vctl. After that you can use your
kind cluster in exactly the normal way.
So far, I’m loving
vctl - so much so I’ve removed Docker Desktop from my laptop completely and am relying on it as my main driver! The key for me is that it’s super easy to switch and virtually a drop in replacement.
I’d love to hear how you plan to deal with Docker’s new pricing structures - are you affected? Will you pay up, or will you find an alternative? Docker have to find a viable business model, that’s for sure…is it this? I don’t know.
Tweet me @sammcgeown!