This is my first time using Docker, and I want to install Odoo with Docker. When I finish creating the docker-compose.yaml file and use the command "docker-compose up -d," I always encounter an error like this.
⠋ Container odoo-db-1 Creating 0.0s
Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /host_mnt/Users/sariaz/Documents/odoo/odoo_pg_pass
I am using macOS Big Sur to run Docker, and I have already granted full access to the disk for Docker and the Terminal. However, the same error still persists.
Error message that you're seeing indicates that the path doesn't exist on your host machine or you gave the wrong path in docker-compose.yml file.
Double check the path, whether it exists in your macOS directory... You can do it by going in to the given path in the error message.
Check the docker-compose.yml
file whether you gave the path correct. Look for the volumes
section and confirm source path matches the actual path on your local directory.
volumes:
- /host_mnt/Users/sariaz/Documents/odoo_pg_pass:/YOUR_PATH_1/YOUR_PATH_2/YOUR_PATH_3/odoo_pg_pass
After making changes, first save the docker-compose.yml file before running it. Additionally restarting the Docker is also useful. And sometimes you have to clear the Docker cache with the following command:
docker system prune