2
respostas

dovker run -it --mount está retornando erro

Estou executando o seguinte script: docker run -it --mount type=bind,source=/var/www/html/projetos, target=/app ubuntu bash

estou recebendo o seguinte erro: invalid argument "type=bind,source=/var/www/html/projetos," for "--mount" flag: invalid field '' must be a key=value pair See 'docker run --help'.

2 respostas

Há um espaço extra na sua linha de comando. Não pode ter espaço após a vírgula (...projetos, target=...) e certifique-se que a pasta "/var/www/html/projetos" existe.

docker run -it --mount type=bind,source=/var/www/html/projetos,target=/app ubuntu bash

A documentação do docker run está diferente, basta verificar.

--mount

docker run -t -i --mount type=bind,src=/var/www/html/projetos,dst=/app ubuntu bash

-v

docker run -v /var/www/html/projetos:/app -it ubuntu bash

https://docs.docker.com/engine/reference/commandline/run/