When a docker-compose remote launch occurs, there is a mistake in mounting toms
-
I'm trying to run a project on a docker-compose through a remote server. It's working, but once I add the tom mounting.
volumes
Makes a mistake:Error response from daemon: invalid mount config for type "bind": invalid mount path: 'C:/Users/user/Projects/my-raspberry-test' mount path must be absolute
Use launch tools from PhpStorm
Docker-compose himself.
version: "3"
services:
php:
image: php:cli
volumes:
- ./:/var/www/html/
working_dir: /var/www/html/
ports:
- 80:80
command: php -S 0.0.0.0:80
Ssh checked:
- Daemon launched,
- Docker's working.
- Docker-compose works.
Also checked remote docker launch using phpstorm and file:
FROM php:cli
COPY . /var/www/html/
WORKDIR /var/www/html/
CMD php -S 0.0.0.0:80
It didn't make a mistake and earned it.
LO on devices:
- PC: Windows 10
- Server: Fedora Server
Without mounting a tom in a docker-compose, it's starting. Maybe someone had a problem like that?
php for example.
-
The road must be absolute for the remote host and the data themselves must be downloaded. I mean, we need to download the project to a remote host.
It's fixed like this:
volumes: - /home/peter-alexeev/my-test:/var/www/html/
There's also an answer. https://stackoverflow.com/questions/69802943/when-running-docker-compose-remotely-an-error-occurs-with-mounting-volumes ♪ There was another solution to the problem.