allfro / device-mapping-manager

58 stars 9 forks source link

Error response from daemon: Encountered remote "application/vnd.docker.plugin.v1+json"(plugin) when fetching #17

Closed demaniak closed 1 month ago

demaniak commented 1 month ago

When attempting to deploy the service, the error as mentioned in the title occurs: Error response from daemon: Encountered remote "application/vnd.docker.plugin.v1+json"(plugin) when fetching

Same problem when running docker pull ndouba/device-mapping-manager manually.

Interestingly, the docker hub page indicates that one should run docker plugin install ndouba/device-mapping-manager:latest for the image.

Which seems to link up with the "plugin" mention in the mime type reported by the error.

docker info:

Client: Docker Engine - Community
 Version:    27.3.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.17.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.7
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 12
  Running: 4
  Paused: 0
  Stopped: 8
 Images: 91
 Server Version: 27.3.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: active
  NodeID: nlu94p3htze9xtfy9ki81mza6
  Is Manager: false
  Node Address: 192.168.1.67
  Manager Addresses:
   192.168.1.2:2377
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c
 runc version: v1.1.14-0-g2c9f560
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.15.0-118-generic
 Operating System: Ubuntu 22.04.5 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 27.26GiB
 Name: iss
 ID: c4f3bc30-2c53-49ba-adae-853c97129900
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: xxx
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
demaniak commented 1 month ago

The magic sauce to make this work can be seen here

The crux seems to be :

From the above link, this will mean something like this:

services:
  device-mapping-manager:
    image: alpinelinux/docker-cli
    entrypoint: docker
    command: |
      run
      --rm
      -i
      --name device-manager
      --privileged
      --cgroupns=host
      --pid=host
      --userns=host
      -v /sys:/host/sys
      -v /var/run/docker.sock:/var/run/docker.sock
      ghcr.io/allfro/allfro/device-mapping-manager:1
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    deploy:
      mode: global
      restart_policy:
        condition: any