A few months ago, I made the decision to start building my my .NET Core side projects from as Linux-based containers instead of Windows-based containers. These projects are mostly CRUD APIs, meaning none of them require the Windows based containers. And, quite frankly, Linux is cheaper….
Now, I had previously built out a few Ubuntu servers with the express purpose of hosting my Linux containers, and changing the Dockerfile was easy enough. But I ran into a HUGE roadblock in trying to get my Octopus deployments to work.
I was able to install Octopus Tentacles just fine, but I could NOT get the tentacle to authenticate to my private docker repository. There were a number of warnings and errors around the docker-credential-helper and pass, and, in general, I was supremely frustrated. I got to a point where I uninstalled everything but docker on the Ubuntu box, and that still didn’t work. So, since it was a development box, I figured there would be no harm in uninstalling Docker… And that is where things got interesting.
When I provision my Ubuntu VMs, I typically let the Ubuntu setup install docker. It does this through snaps, which, as I have seen, have some weird consequences. One of those consequences seemed to be a weird interaction between docker login and non-interactive users. The long and short of it was, after several hours of trying to figure out what combination of docker-credential-helper packages and configurations were required, removing EVERYTHING and installing Docker via apt (and docker-compose via a straight download from github) made everything work quite magically.
While I would love nothing more than to recreate the issue and figure out why it was occurring, frankly, I do not have the time. It was easier for me to swap my snap-installed Docker packages for apt-installed ones and move forward with my project.