Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker (for Windows) does not mount volume

I'm trying to mount a directory with configuration files in my docker-compose.yml.

In my case it is logstash, which tells me the mounted directory is empty. Loading a bash and ls -la in the parent directory shows that the pipeline directory is empty and is owned by root.

One weird thing is, that it worked a few days ago.

docker-compose.yml:

version: '3'
services:
  logstash:
    image: docker.elastic.co/logstash/logstash:5.6.3
    ports:
      - 5000:5000
      - 8989:8989
    volumes:
      - C:/PROJECT_DIR/config/logstash/pipeline/:/usr/share/logstash/pipeline/
like image 721
Malone Avatar asked Oct 26 '17 13:10

Malone


1 Answers

I found it better to try around with docker itself, as it gives more feedback

docker run --rm -it -v C:/PROJECT_DIR/config/logstash/pipeline/:/usr/share/logstash/pipeline/ docker.elastic.co/logstash/logstash:5.6.3

From here and some googling I found out I had to reset my shared drives credentials under "Docker for Windows" -> Settings... -> Shared Drives, because I had changed my windows domain user password.

like image 63
Malone Avatar answered Sep 20 '22 14:09

Malone