Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Mount Config Error on Windows with Docker CE 27.2.1 #5453

Closed
freeurcom opened this issue Sep 18, 2024 · 2 comments
Closed

Invalid Mount Config Error on Windows with Docker CE 27.2.1 #5453

freeurcom opened this issue Sep 18, 2024 · 2 comments

Comments

@freeurcom
Copy link

freeurcom commented Sep 18, 2024

Description

After updating Docker CE from version 24.x.x to 27.x.x on Windows Server 2022, I encountered an error when attempting to use bind mounts in a Docker Compose file. The error indicates an invalid mount configuration due to an invalid propagation mode (rshared or rprivate), which should not apply to Windows systems.

Actual behaviour
An error occurs, and the container fails to start. The error message is:
Error response from daemon: invalid mount config for type "bind": invalid propagation mode: rshared

Additional Information

  • This configuration worked correctly in Docker CE version 24.x.x. After upgrading to version 27.x.x, the error started occurring.
  • I tried various adjustments, including:
    • Explicitly setting the bind.propagation mode to shared or rprivate.
    • Changing the host directory to the C: drive.
    • Using different path notations (forward slashes, backslashes).
  • None of these adjustments resolved the issue.

Reproduce

  1. Environment Setup:
  • OS: Windows Server 2022
  • Docker Version: 27.2.1 (specific version number)
  • Docker Compose Version: 2.29.5
  • Container Image: mongo:7.0.14-rc0-nanoserver-ltsc2022
  1. Create a compose.yml file with the following content:
services:
  mongodb:
    image: mongo:7.0.14-rc0-nanoserver-ltsc2022
    container_name: mongodb-production
    ports:
      - "27017:27017"
    volumes:
      - F:/phoenix-lej/data/db:C:/data/db
    restart: on-failure:30
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "200"
        compress: "true"
  1. Run the Docker Compose command:
docker-compose up

Expected behavior

The MongoDB container starts successfully, with the host directory F:/phoenix-lej/data/db bound to C:/data/db inside the container.

docker version

Client:
 Version:           27.2.1
 API version:       1.47
 Go version:        go1.22.7
 Git commit:        9e34c9b
 Built:             Fri Sep  6 12:09:12 2024
 OS/Arch:           windows/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          27.2.1
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.22.7
  Git commit:       8b539b8
  Built:            Fri Sep  6 12:08:06 2024
  OS/Arch:          windows/amd64
  Experimental:     false

docker info

Client:
 Version:    27.2.1
 Context:    default
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.5
    Path:     C:\ProgramData\Docker\cli-plugins\docker-compose.exe

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 27.2.1
 Storage Driver: windowsfilter
  Windows:
 Logging Driver: json-file
 Plugins:
  Volume: local
  Network: ics internal l2bridge l2tunnel nat null overlay private transparent
  Log: awslogs etwlogs fluentd gcplogs gelf json-file local splunk syslog
 Swarm: inactive
 Default Isolation: process
 Kernel Version: 10.0 20348 (20348.1.amd64fre.fe_release.210507-1500)
 Operating System: Microsoft Windows Server Version 21H2 (OS Build 20348.2700)
 OSType: windows
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.909GiB
 Name: FREEURCOM-BUILD
 ID: 9087e57c-cc05-4b8e-9446-db59d51a5f75
 Docker Root Dir: C:\ProgramData\Docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

[DEPRECATION NOTICE]: API is accessible on http://127.0.0.1:2375 without encryption.
         Access to the remote API is equivalent to root access on the host. Refer
         to the 'Docker daemon attack surface' section in the documentation for
         more information: https://docs.docker.com/go/attack-surface/
In future versions this will be a hard failure preventing the daemon from starting! Learn more at: https://docs.docker.com/go/api-security/

Additional Info

No response

@thaJeztah
Copy link
Member

This is a bug in compose, and you can temporarily downgrade the docker-compose plugin to an older version until v2.29.6 is released; see

@thaJeztah
Copy link
Member

I'll close this ticket as duplicate of docker/compose#12137 and because it's not a bug in this repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants