Skip to content

nerdctl compose fails with warning: "Ignoring: volume: Bind: [CreateHostPath]" #3603

Closed as not planned
@mirzaprangon

Description

@mirzaprangon

Discussed in #3150

Originally posted by mirzaprangon October 13, 2022
Hello
I am on windows, rancher desktop version 1.6.0.
I have a simple compose file with directory mounts, nothing fancy just a mysql container.

services:
  mysql_db:
    image: mysql:8.0.30
    restart: always
    volumes:
      - ./mysql_db_data:/var/lib/mysql
      - ./mysql_db_config:/etc/mysql/conf.d
    environment:
      - MYSQL_DATABASE=keycloak
      - MYSQL_ROOT_PASSWORD=root_password
      - MYSQL_USER=db_user
      - MYSQL_PASSWORD=db_password
      - TZ=Asia/Tokyo
    command: 
      - --sql_mode=ANSI,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
      - --lower-case-table-names=1
      - --default-time-zone=UTC
    ports:
      - 3306:3306

But nerdctl compose up fails if I run with containerd engine. The output I get is as follow

WARN[0000] Ignoring: volume: Bind: [CreateHostPath]
WARN[0000] Ignoring: volume: Bind: [CreateHostPath]
INFO[0000] Ensuring image mysql:8.0.30
INFO[0000] Ensuring image quay.io/keycloak/keycloak:19.0.3
INFO[0000] Creating container development_environment_mysql_db_1
INFO[0000] Creating container development_environment_keycloak_1
FATA[0000] error while creating container development_environment_keycloak_1: exit status 1

I can run the compose file if I change my container engine to Dockerd/moby and use docker compose up.
If I remove the volume binds I can run the compose file with nerdctl compose up.

I am on windows. Outut of rdctl list-settings

{
  "version": 4,
  "kubernetes": {
    "version": "1.24.4",
    "memoryInGB": 2,
    "numberCPUs": 2,
    "port": 6443,
    "containerEngine": "containerd",
    "checkForExistingKimBuilder": false,
    "enabled": false,
    "WSLIntegrations": {},
    "options": {
      "traefik": true,
      "flannel": true
    },
    "suppressSudo": false,
    "hostResolver": true,
    "experimental": {
      "socketVMNet": false
    }
  },
  "portForwarding": {
    "includeKubernetesServices": false
  },
  "images": {
    "showAll": true,
    "namespace": "buildkit"
  },
  "telemetry": true,
  "updater": true,
  "debug": false,
  "pathManagementStrategy": "notset",
  "diagnostics": {
    "showMuted": false,
    "mutedChecks": {}
  }
}

nerdctl compose Should make empty mount directories if those do not exist like docker compose

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions