OpenMediaVault-Plugin-Developers / openmediavault-compose

openmediavault plugin for docker-compose
14 stars 5 forks source link

Docker build unknown flag --progress #8

Closed rabesocke closed 1 year ago

rabesocke commented 1 year ago

Since one of the last updates, I have the problem that I cannot build Dockerfiles anymore.

It seems, that the flag --progress was added to the command. But this is an unknown flag for docker build (https://docs.docker.com/engine/reference/commandline/build/#options).

Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; docker build --pull --progress plain --tag 'xxx' xxx 2>&1': DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

unknown flag: --progress
See 'docker build --help'.

OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; docker build --pull --progress plain --tag 'xxx' xxx 2>&1': DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

unknown flag: --progress
See 'docker build --help'. in /usr/share/openmediavault/engined/rpc/compose.inc:479
Stack trace:
#0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(619): OMVRpcServiceCompose->{closure}('/tmp/bgstatusVm...', '/tmp/bgoutputXx...')
#1 /usr/share/openmediavault/engined/rpc/compose.inc(482): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
#2 [internal function]: OMVRpcServiceCompose->doBuild(Array, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('doBuild', Array, Array)
#5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Compose', 'doBuild', Array, Array, 1)
#6 {main}
ryecoaaron commented 1 year ago

Are you on an i386 system or not have the docker repo enabled in omv-extras? Either of these would cause your system to use docker and compose from the Debian reo which is older. I might have to make that flag conditional based on architecture.

rabesocke commented 1 year ago

As far as I know, it's a AMD64 system.

image

And I have the docker repo enabled.

image
ryecoaaron commented 1 year ago

Can you post the versions of docker and docker-compose from the Setttings tab in the Compose plugin?

rabesocke commented 1 year ago
image
ryecoaaron commented 1 year ago

Those look right. Can you post the output of: dpkg -l | grep docker

rabesocke commented 1 year ago
root@xxx:~# dpkg -l | grep docker
ii  docker-ce                         5:24.0.2-1~debian.11~bullseye                    amd64        Docker: the open-source application container engine
ii  docker-ce-cli                     5:24.0.2-1~debian.11~bullseye                    amd64        Docker CLI: the open-source application container engine
ii  docker-compose-plugin             2.18.1-1~debian.11~bullseye                      amd64        Docker Compose (V2) plugin for the Docker CLI.
rc  docker-engine                     17.05.0~ce-0~debian-jessie                       amd64        Docker: the open-source application container engine
ii  python3-docker                    4.1.0-1.2                                        all          Python 3 wrapper to access docker.io's control socket
ryecoaaron commented 1 year ago

Huh, the build plugin isn't installed. Can you post the output of: sudo omv-salt deploy run compose

rabesocke commented 1 year ago

It seems, that the plugin is now installed.

root@xxx:~# sudo omv-salt deploy run compose
xxx:
----------
          ID: /etc/systemd/system/docker.service.d/waitAllMounts.conf
    Function: file.managed
      Result: True
     Comment: File /etc/systemd/system/docker.service.d/waitAllMounts.conf is in the correct state
     Started: 15:23:01.470383
    Duration: 103.178 ms
     Changes:   
----------
          ID: systemd_daemon_reload_docker
    Function: cmd.run
        Name: systemctl daemon-reload
      Result: True
     Comment: Command "systemctl daemon-reload" run
     Started: 15:23:01.580291
    Duration: 2152.856 ms
     Changes:   
              ----------
              pid:
                  1156281
              retcode:
                  0
              stderr:
              stdout:
----------
          ID: /etc/docker/daemon.json
    Function: file.serialize
      Result: True
     Comment: File /etc/docker/daemon.json is in the correct state
     Started: 15:23:03.733569
    Duration: 85.051 ms
     Changes:   
----------
          ID: docker
    Function: service.running
      Result: True
     Comment: The service docker is already running
     Started: 15:23:04.196017
    Duration: 100.18 ms
     Changes:   
----------
          ID: /usr/local/bin/docker-compose
    Function: file.symlink
      Result: True
     Comment: Symlink /usr/local/bin/docker-compose is present and owned by root:root
     Started: 15:23:04.296771
    Duration: 100.527 ms
     Changes:   
----------
[...]
----------
          ID: docker_install_packages
    Function: pkg.installed
      Result: True
     Comment: All specified packages are already installed
     Started: 15:23:13.763046
    Duration: 228.309 ms
     Changes:   
----------
          ID: docker_compose_install_packages
    Function: pkg.installed
      Result: True
     Comment: 1 targeted package was installed/updated.
              The following packages were already installed: docker-compose-plugin, containerd.io, docker-ce-cli
     Started: 15:23:13.991766
    Duration: 25823.537 ms
     Changes:   
              ----------
              docker-buildx-plugin:
                  ----------
                  new:
                      0.10.5-1~debian.11~bullseye
                  old:
----------
          ID: docker_purged_packages
    Function: pkg.purged
      Result: True
     Comment: All specified packages are already absent
     Started: 15:23:39.826248
    Duration: 3.268 ms
     Changes:   

Summary for xxx
-------------
Succeeded: 35 (changed=2)
Failed:     0
-------------
Total states run:     35
Total run time:   29.088 s
ryecoaaron commented 1 year ago

Good. I expected it to fix the issue but I am wondering how it wasn't installed previously. Have you not applied any changes to the Compose plugin in a long time? Are you still getting the --progress argument error?

rabesocke commented 1 year ago

It works now. The output of the docker build console is now different (due to the other plugin).

I always apply outstanding changes, when they are displayed in OMV. Nevertheless, it now works again :-)