vmware-tanzu-labs / educates-training-platform

A platform for hosting interactive workshop environments in Kubernetes, or on top of a local container runtime.
https://docs.educates.dev
Apache License 2.0
72 stars 18 forks source link

Error `unknown flag: --progress` when run `make` #362

Open imurata opened 4 months ago

imurata commented 4 months ago

Describe the bug

When I run make I get the following error.

docker build --progress plain --platform linux/arm64 -t localhost:5001/educates-session-manager:latest session-manager
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'.
make: *** [build-session-manager] Error 125

The reason is I'm using Docker latest and there is not --progress option for docker build.

Additional information

No response

GrahamDumpleton commented 4 months ago

What do you get when running:

docker version
imurata commented 4 months ago

It fails in each of the Mac and Linux environments at hand.

Mac:

docker version
Client:
 Version:           26.1.0
 API version:       1.41 (downgraded from 1.45)
 Go version:        go1.21.9
 Git commit:        9714adc
 Built:             Mon Apr 22 17:04:03 2024
 OS/Arch:           darwin/amd64 (rosetta)
 Context:           default

Server: linux/arm64/fedora-39
 Podman Engine:
  Version:          5.0.2
  APIVersion:       5.0.2
  Arch:             arm64
  BuildTime:        2024-04-17T09:00:00+09:00
  Experimental:     false
  GitCommit:
  GoVersion:        go1.21.9
  KernelVersion:    6.8.4-200.fc39.aarch64
  MinAPIVersion:    4.0.0
  Os:               linux
 Conmon:
  Version:          conmon version 2.1.10, commit:
  Package:          conmon-2.1.10-1.fc39.aarch64
 OCI Runtime (crun):
  Version:          crun version 1.14.4
commit: a220ca661ce078f2c37b38c92e66cf66c012d9c1
rundir: /run/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  Package:          crun-1.14.4-1.fc39.aarch64
 Engine:
  Version:          5.0.2
  API version:      1.41 (minimum version 1.24)
  Go version:       go1.21.9
  Git commit:
  Built:            Wed Apr 17 09:00:00 2024
  OS/Arch:          linux/arm64
  Experimental:     false

Linux:

 docker version
Client:
 Version:           24.0.5
 API version:       1.43
 Go version:        go1.20.3
 Git commit:        24.0.5-0ubuntu1~22.04.1
 Built:             Mon Aug 21 19:50:14 2023
 OS/Arch:           linux/amd64
 Context:           default

Server:
 Engine:
  Version:          24.0.5
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.3
  Git commit:       24.0.5-0ubuntu1~22.04.1
  Built:            Mon Aug 21 19:50:14 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.2
  GitCommit:
 runc:
  Version:          1.1.7-0ubuntu1~22.04.2
  GitCommit:
 docker-init:
  Version:          0.19.0
  GitCommit:
GrahamDumpleton commented 4 months ago

Can you try installing the docker buildx component as per message and link? I believe it will use that if installed and that may eliminate the issue, plus it is needed anyway to do cross compilation I think.

Note that although you say you are using latest docker, you are actually on an old version for Linux at least. On macOS for me it reports version 26.0.0.

jorgemoralespou commented 3 months ago

Hi, @imurata wanted to circle back on this. The version I see in the output for your Mac, it seems it's really from a fedora box using podman. With Mac, using Docker Desktop there's no issues. On my system, reports:

docker version
Client:
 Version:           26.1.4
 API version:       1.45
 Go version:        go1.21.11
 Git commit:        5650f9b
 Built:             Wed Jun  5 11:26:02 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.31.0 (153195)
 Engine:
  Version:          26.1.4
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       de5c9cf
  Built:            Wed Jun  5 11:29:12 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.33
  GitCommit:        d2d58213f83a351ca8f528a95fbd145f5654e957
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

On my linux box, reports this. I have installed Docker from docker.com and not the ones that comes with my Ubuntu distribution:

Client: Docker Engine - Community
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.20.10
 Git commit:        afdd53b
 Built:             Thu Oct 26 09:07:41 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:07:41 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.26
  GitCommit:        3dd1e886e55dd695541fdcd67420c2888645a495
 runc:
  Version:          1.1.10
  GitCommit:        v1.1.10-0-g18a0cb0
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

And both of them seem to be working fine and not complaining about --progress flag. Both of them comes with buildx command though.

Ubuntu reporting:

$ docker buildx version
github.com/docker/buildx v0.11.2 9872040

And macos, reporting:

docker buildx version
github.com/docker/buildx v0.14.1-desktop.1 5a0555e6c99a65811f4409bce8460a8fb89474f1

Since we do builds for multiple architectures we need buildx to be there, so if it doesn't come in your distro when you install docker, you might need to install it additionally. Something like sudo apt install docker-buildx but depends on your specific distro.