-
Notifications
You must be signed in to change notification settings - Fork 5
docker troubleshooting
Make sure Apache / Nginx is not running on your local machine on port 80
.
The same goes for MySQL if it's running on port 3306
on localhost
.
To stop those on a default OSX install:
$ sudo apachectl stop
$ mysql.server stop
Or if there's another Docker Compose instance running, list all running containers:
$ docker ps
The PORTS
column contains the port mappings of a container. Search for the conflicting ports. You can kill that container (docker kill [CONTAINER ID]
) or cd
to the project dir and shut down the Docker Compose cluster:
$ docker-compose stop
If a machine is stuck and won't shut down, try stopping all containers first. Then restart the Docker Compose cluster. You shouldn't be losing any data this way.
Remove the dollar signs for Fish shell.
$ docker-compose stop
If everything is still failing and you're close to insanity, you can try this collection of hardcore methods. Be prepared to lose all of your (database) data though:
$ docker-compose stop
$ docker-compose rm -v
To enforce a pull of the latest used Docker images:
$ docker-compose pull
Use docker-compose up --build
to recreate the containers.
If you have done an npm install
before on your host system (f.i. OSX), these are not compiled for the right system inside the web server (Debian).
Solution is to compile again inside the container:
$ rm -rf node_modules
$ docker-compose exec [service] npm i
- Is Docker running?
- Did you add a port mapping?
MySQL at it again 🙄
--initialize specified but the data directory has files in it. Aborting.
Does the database tell you this during startup of your Docker image?
This is caused by a permission error on the mounted data volume. If this happens, please report it to us, with instructions on how to reproduce it.
As a workaround, you can delete application/data/docker/*
and restart the server, which will empty the database and force MySQL to reinitialize.
Something is happening and it seems to be specifically tied to the Docker setup? To debug, you can take a look at the setup that we use for Docker. It consists of 3 opensource images:
- the web server
- the database server
- and the data storage container
Docker has performance issues on MacOS. Try using NFS to fix it.