I just slayed this dragon yesterday. After 5 days of beating my head against the wall, that beast is dead and I’m just dealing with the fiddly bits.
First, a couple of things.
- If your Windows 2016 machine is a VM, you need to look into enabling nested virtualization.
- If you Windows 2016 VM is hosted in Azure…Microsoft only supports nested vitualization on their Dv3 and Ev3 size VMs. If you’re on AWS or someone else’s, good luck, I can’t help you with that.
- No, running the Azure Windows 2016 with Containers did not seem to help at all with getting Docker and Bitwarden running.
- Throw Docker EE away and uninstall it from your Windows 2016 server. Download Docker CE. I tried getting EE to work on 2016 and 2019 with no luck whatsoever.
These posts helped me get nested virtualization enabled: https://azure.microsoft.com/en-us/blog/nested-virtualization-in-azure/ and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/nested-virtualization
- The second article has a link to a github repo with a PowerShell script that will get HyperV installed and nested virtualization configured for you. I did not find it necessary to setup or do any of the networking configuration stuff mentioned in the above articles.
Okay, now you are ready to install Docker CE. Basically, I just accepted the defaults…and CE actually worked once I installed it on a VM size that supported nested virtualization (and had it configured). Docker CE will throw a warning that (Windows 2016) Build 18439 has been deprecated, just ignore it. I did not find it necessary to configure any of the networking stuff in Docker. Docker Compose comes with the CE edition, so you don’t have to worry about that. It does take Docker several minutes to get up and running the first time, just be patient. I did sign into Docker and share the C: drive initially, but that seemed to cause problems so I unshared the C: and signed out of Docker and reran the Bitwarden install to resolve the error messages I received. I also found it necessary to run the Docker CE install as an administrator.
Once you have Docker CE running, execute the Bitwarden install commands just like it says in the instructions. You will be asked if you want Docker to share the C: as part of the install, select YES. ALSO, unless you turn the Windows firewall off, you will have to add a rule allowing TCP Port 443 (or whatever port you’re hosting Bitwarden on) through.
I hope this helps. Getting Bitwarden up and running is simple, getting Docker to run a Linux container on Windows 2016…not so much.