ERROR: Service failed to build: invalid reference format

Docker gave me this error today when running a Running the build command manually instead of using docker-compose gave me: The issue is with the image tag: “:1.16:1“. It must be “:1.16.1“. Just as a reminder of how important it is to be thorough and, of course, what the error might mean if you encounter… Continue Reading ERROR: Service failed to build: invalid reference format

Install docker-machine on osx

Because since recently, whenever I update Docker, my docker-machine command is gone and I keep forgetting how to re-install it: This is to save time next time it happens. Instructions provided on docker/machine Github.

Add root ca cert to docker-machine

When creating new docker-machine Docker nodes, one needs to add necessary root CA certificates to them in order to let them communicate with SSL protected services. The easiest, if manual, method is to copy the ca certificate (in .pem format) to /var/lib/boot2docker/certs on EVERY swarm node (if running in swarm mode).

Reminder: Make Docker trust certificates

To import a self-signed CA certificate that you want to manually trust in your Docker VM, follow these steps: Taken from: Recommended way to install CA certificate on local VM docker machine #1799 According to play-with-docker.com you can also trust a self-signed cert by doing the following: If you are running the registry locally, be… Continue Reading Reminder: Make Docker trust certificates

Docker: TaskNuke remove those annoying orphaned tasks from a network

The setting: $ docker network rm myNetwork Error response from daemon: rpc error: code = FailedPrecondition desc = network kny0nsuae9ymnpzjzufrefn9a is in use by task iczzsz7yrrafhn08y1slnhr8l The solution: $ docker pull dperny/tasknuke! $ docker run -v /var/run/docker/swarm/control.sock:/var/run/swarmd.sock dperny/tasknuke iczzsz7yrrafhn08y1slnhr8l iczzsz7yrrafhn08y1slnhr8l The glorious source: success.docker.com – How to force remove an orphaned task from a network

Docker: Symlink your log files to stdout and stderr!

When you’re in a Docker container, ideally you don’t want to have to enter the container in order to read log files. It’d be best to have everything on stdout and stderr of your container so Docker picks them up automatically and thus delivers it to any logging driver you attach. This is thankfully easily… Continue Reading Docker: Symlink your log files to stdout and stderr!

Getting original client IP from a request in Docker Swarm – Or the issue with issue #25526

Puh…this is a big one… A client contacted me saying the webserver’s logs on one of our swarm stacks reports the same IP address for any request and it’s not one of any of the clients used: – 10.255.0.2 [18/Oct/2018:13:38:43 +0000] “GET / HTTP/1.0” 401 113 “HTTP-Monitor/1.1” 1 This is an issue as we require… Continue Reading Getting original client IP from a request in Docker Swarm – Or the issue with issue #25526

Docker – Add trusted root ca to local docker-machine swarm

As one might want when using a custom Docker registry with a cert signed by a custom root ca. As finding the answer to this question has proven somewhat complicated, I’ll note my approach here for future reference (excerpt): Basically, copy pem (Base64 encoded) versions of your CA trust chain into /var/lib/boot2docker/certs/. You can’t use… Continue Reading Docker – Add trusted root ca to local docker-machine swarm

Keep any Docker container running

By simply using docker run -d centos tail -f /dev/null as the CMD/Entrypoint. Read more: Docker container will automatically stop after “docker run -d”