Skip to main content

32 posts tagged with "Docker"

View All Tags

Autoheal your Docker containers

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 3 min read
Holger Dörner
PHP Developer & Chapter Lead

Sometimes one may face the need to restart a Docker container because it does not react anymore. While there are dozens of possible ways to accomplish this, I want to show the one we recently started to incorporate into our setups.

Traefik with multiple Docker networks

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 4 min read
Stephan Hochdörfer
Head of IT Business Operations

Sometimes, mostly for smaller customers, we deploy staging and production environments on the same machine. Not an ideal setup, but doable. Thanks to Docker the different instances can live in isolation, except of course when one instance takes the server down, the other instance is also affected.

Easily install PHP extension in your own Docker images

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

Recently, I wanted to improve our CI build pipelines with some custom-built Docker images for our PHP projects. To make sure I can reuse the image in as many of our projects as possible, I wanted to compile and install as many PHP extensions as possible.

MySQL ERROR 1062 - Duplicate entry for key PRIMARY

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· One min read
Stephan Hochdörfer
Head of IT Business Operations

Simply put, error 1062 is caused when MySQL finds a DUPLICATE of a row you are trying to insert. I sometimes hit this error when importing database dumps of applications that have been in production for a long time. The “fix” is easy: Find the duplicate data and delete it. Depending on your database structure it might not be that easy though. I that case, I configure MySQL to ignore those errors, for local development I find that approach acceptable. For dockerized setups, you can pass a “sql_mode” flag to the container which then will be interpreted by the MySQL server during startup. The docker-compose configuration that works for me looks like this: