debug php inside a docker container with vscode (on mac os)

To debug php code inside a Docker container using VSCode as your IDE, proceed as follows: Install php and the relevant extensions using your Dockerfile like so: Add the following xdebug config and copy it over to your image like so: Please note specifically: The client_host “host.docker.internal” is a Docker for Mac specific thing. It… Continue Reading debug php inside a docker container with vscode (on mac os)

docker login: incorrect username or password

When you run “docker login <myReg>” and Docker screams This might actually not be the problem. Thank you very much Docker, for this useless piece of error. While it might be possible that you’re just too stupid to type your username/password 500 times in a row (although not very likely), the error might be fixable… Continue Reading docker login: incorrect username or password

traefik gateway timeout

This is a networking problem. The traefik container cannot reach the destination container. This is most likely the problem of the default or specific network defined for traefik and the destination container. Assume this compose file: So you’d think your traefik default network configuration would look like this: But you have to remember that Docker… Continue Reading traefik gateway timeout

osx docker, kubernetes, helm setup

Install Docker-Desktop: https://www.docker.com/products/docker-desktop Enable Kubernetes Cluster bundled with Docker: https://docs.docker.com/docker-for-mac/#kubernetes Install helm: https://helm.sh/docs/intro/quickstart/ Add kubectl and helm commandline completion to .zshrc: source <(kubectl completion zsh)source <(helm completion zsh)

docker container stuck in ‘new’ state forever

I’ve had this issue a couple of times and I formulated a devops-stackexchange question eventually. Although I do not yet really have a way to debug the NEW state, there is some information there: Docker container stuck in “new” state – Docker swarm – service stack

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