-
If you have issues running a Docker command to start services after deleting a
previous Docker Compose cluster, try replacing step 8 in the initial Docker
Compose instructions with the Docker command to stop and remove any running
containers, rebuild them without using cache, and then start a different set of
services defined in the docker-compose.yml file.
For example:
docker compose down && docker compose build --no-cache && docker compose up
For the required Docker command, see the CLI reference section on the Docker Documentation site at https://docs.docker.com. -
If you’re having issues running a Docker command to start services on Windows
environments due to unavailable or reserved ports, and get errors such as:
bind: An attempt was made to access a socket in a way forbidden by
its access permissions which means that the Windows NAT (WinNAT)
service has reserved the port range that Docker Compose is trying to use.
To remedy this issue, run the following in a terminal:
net stop winnat docker compose up net start winnat
- Stop the session by using CONTROL+C.
-
Stop and remove the containers defined in
docker-compose.yml using a Docker command.
For the required Docker command, see the CLI reference section on the Docker Documentation site at https://docs.docker.com.
-
Try allocating more memory resources to Docker, as advised in
docker-compose.yml.
For example, in Docker, change the memory setting in Preferences (Mac) or Settings (Windows) > Resources > Advanced > Memory to at least 13 GB. If you make changes, click Apply & Restart and wait for the process to finish before continuing.
Go back to step 5 in the initial Docker Compose instructions to start the deployment again.
When using Linux as Docker host, all the memory in the computer is available to Docker Compose. So no additional actions are required.
When using Docker with Windows Subsystem for Linux (WSL) 2 Backend in Windows, use the .wslconfig file to increase the memory available for Docker Compose. For more information on WSL 2 Backend, see the Docker Desktop WSL 2 backend on Windows article on the Docker Documentation site: https://docs.docker.com/.
Note: In order to deploy onto Docker Desktop you need to allocate at least 13 GB (preferably 16 GB) to the Docker Engine on the Resources tab in Docker Desktop’s preferences pane as shown in the screenshot below. This is required because insufficient memory will cause containers to exit without warning.