Description
Hi,
I have docker 19.03 on ubuntu amd64 and I tried the steps in your readme but fail to get buildx command working. It complains command not found. What do I need to get it working? I tried beta release as well and same issue. I am looking to compile images for arm64.
Appreciate the help a lot,
Puja
$ cat ~/.docker/config.json
{
"experimental": "enabled"
}
$ ls -l ~/.docker/cli-plugins/docker-buildx
total 55936
drwxr-xr-x 2 pujag newhiredefaultgrp 4096 Aug 12 14:05 .
drwxr-xr-x 3 pujag newhiredefaultgrp 4096 Aug 12 14:01 ..
-rwxr-xr-x 1 pujag newhiredefaultgrp 57036919 Aug 12 14:04 buildx-v0.2.0.linux-amd64
$ docker version
Client: Docker Engine - Community
Version: 19.03.1
API version: 1.40
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:21:05 2019
OS/Arch: linux/amd64
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 19.03.1
API version: 1.40 (minimum version 1.12)
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:19:41 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.6
GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc:
Version: 1.0.0-rc8
GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f
docker-init:
Version: 0.18.0
GitCommit: fec3683
Activity
FernandoMiguel commentedon Aug 14, 2019
I've had happen before since ~/.docker/cli-plugins/docker-buildx is mot in $PATH
you can manually run that to install it.
Or straight away refer to it for execution (that's what I personally do)
If you find the right steps to enable it as drop in, a PR to update the docs would be appreciated
FernandoMiguel commentedon Aug 14, 2019
BTW, that's the old release, consider upgrading to 0.3 which has nice additions.
I believe that the nightly builder have been broken since last docker release, so no new version has been pushed
pujag-xlnx commentedon Aug 14, 2019
Thank you so much for the reply. Works for me now. Path issues. Yes will update, I see newer version now.
pujag-xlnx commentedon Aug 14, 2019
How can I compile images for arm64 embedded on my amd64 linux machine? Buildx lists only linux/amd64 in platforms for me. I had downloaded buildx-3.0-amd64 and saved it as docker-buildx in cli-plugins. is that the right way to do it?
$ docker buildx ls
NAME/NODE DRIVER/ENDPOINT STATUS PLATFORMS
mybuilder * docker-container
mybuilder0 unix:///var/run/docker.sock running linux/amd64, linux/386
default docker
default default running linux/amd64
tonistiigi commentedon Aug 15, 2019
docker-buildx
doesn't need to be on $PATH but~/.docker/cli-plugins/docker-buildx
is the binary itself, not a directory containing the binary.If you don't use Docker Desktop you need to set up qemu support in your kernel yourself and buildx will pick it up on bootstrap. You can use https://github.com/multiarch/qemu-user-static#getting-started or https://hub.docker.com/r/docker/binfmt/tags images to install the emulation support.
pujag-xlnx commentedon Aug 16, 2019
Thanks @tonistiigi . Yes I had created a directory instead of file, works perfect now.
Thanks for the link, so if I understand it right qemu-user-static seems to be useful if I wanted to run arm64 image on host x86, but if I just wanted to create arm64 image on host x86 and run on embedded arm64 I might not need qemu-user-static?
tonistiigi commentedon Aug 16, 2019
@gupta05 If your Dockerfile needs to execute
RUN
commands for another architecture you need to load theqemu-user-static
support to kernel before. If you only use other commands you can build directly for any platform.yxliang01 commentedon Sep 15, 2019
Docker-ce CLI 19.03.2 , git commit 6a30dfca03 , experimental enabled .
docker buildx
yields 'buildx' is not a docker command. Does this suggest that buildx is not bundled for docker-ce CLI 19.03 (that the README.md is wrong) ?FernandoMiguel commentedon Sep 15, 2019
@yxliang01 do you have the plugin installed?
yxliang01 commentedon Sep 15, 2019
@FernandoMiguel I didn't install myself because in the README.md of this repo, it says buildx is bundled with docker 19.03, right? So, I wouldn't expect the need to install it manually. See https://github.com/docker/buildx/blob/master/README.md#docker-ce .
FernandoMiguel commentedon Sep 15, 2019
@yxliang01 I always found I had to either install it or include it in the $PATH
darkvertex commentedon Sep 17, 2019
Did you add
"experimental": "enabled"
in your~/.docker/config.json
?29 remaining items