Jump to content

Can no longer build Docker images after update to 6.12.8


Go to solution Solved by mbush78,

Recommended Posts

After updating, If I'm ssh'd into my UnRaid and I try to 'docker build...' It now fails with the error: ERROR: BuildKit is enabled but the buildx component is missing or broken. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/buildx 

I can't add docker-buildx to /root/.docker/cli-plugins/ it saves but won't become executable. For now I just copy it into /usr/libexec/docker/cli-plugins/docker-buildx but that get's wiped anytime the box gets rebooted. Any help would be appreciated. Thanks. 

  • Upvote 1
Link to comment
  • 4 weeks later...
Posted (edited)

Are we like the only weird-o's that were building docker images in unraid? :) Or are we just to only two that somehow broke their system lol. 

I haven't tried it yet but was thinking maybe I'll create a fresh install of the trial build on some random usb stick just to see if buildx works there and it's really just my issue or if its truly busted 😕  really dunno what else to do.  Is there someplace to submit bug tickets that I've totally overlooked somewhere? 

 

I was blind, https://account.unraid.net/troubleshoot going there allowed me to submit a support ticket. 

Edited by mbush78
Link to comment
  • 3 weeks later...
On 3/20/2024 at 5:23 PM, mbush78 said:

Are we like the only weird-o's that were building docker images in unraid? :) Or are we just to only two that somehow broke their system lol. 

I haven't tried it yet but was thinking maybe I'll create a fresh install of the trial build on some random usb stick just to see if buildx works there and it's really just my issue or if its truly busted 😕  really dunno what else to do.  Is there someplace to submit bug tickets that I've totally overlooked somewhere? 

 

I was blind, https://account.unraid.net/troubleshoot going there allowed me to submit a support ticket. 

Did you get any response on your support ticket?

Link to comment
  • 3 weeks later...
On 4/8/2024 at 6:51 AM, mbush78 said:

ok, now I don't recall if I got an automated response. So I resubmitted, and this time, I have a response and I can see the support ticket. Will wait and see. Thanks.

Any news, just ran into this?

Link to comment
1 hour ago, Vyperious said:

Any news, just ran into this?

Yea, got this from @DanL via the support ticket I have

 

Hello,

 

It turns out it's pretty simple.  Here are the steps:

Upzip and put the attached executable in your '/flash/custom/' folder:

Add the following commands to a User Script that runs on first array start or to your go file.

# Install the docker buildx component cp /boot/custom/docker-buildx /usr/bin/ chmod +x /usr/bin/docker-buildx

Now the docker build command will be:

docker-buildx build...

 

 

Let me know if it works for you.  Works fine for me.

 

I'll work towards getting this built into Unraid.

 

Dan L

docker-buildx.zip

Link to comment
  • 2 weeks later...
  • Solution

A variation, still download and unzip the file above but, for the user script:

#!/bin/bash
# Create docker plugins directory
mkdir -p /usr/libexec/docker/cli-plugins/
# Install the docker buildx component
cp /boot/custom/docker-buildx /usr/libexec/docker/cli-plugins/
chmod +x /usr/libexec/docker/cli-plugins/docker-buildx

 

With this the 'docker build' command uses the new 'docker-buildx' 

Link to comment
  • 4 weeks later...

I'm pretty new to CLI docker and Unraid, so forgive my ignorance on aspects of this (if you can :D)

*I was able to finally make this fix above work after running through all my errors again and again with ChatGPT 4*

  1. I downloaded and unzipped the docker-buildx.zip file above from @DanL onto my windows desktop and then uploaded it through my file manager plugin on UnRaid to the "custom" folder that is in the same directory as ' EFI, syslinux, extra '  etc... (by accessing it through my file manager plugin within UnRaid Settings)
  2. I added the config changes shared by @mbush78 to my go file -- (also by accessing it through my file manager plugin within UnRaid Settings)
  3. I ran into permissions issues and other things, likely because of previous attempts to install/get working the buildx plugin

Just for future reference for others out there who may stumble across this same issue...

  • From start to finish, is there a more efficient way to just CLI correct this issue with just a few commands strung together -- pulling the docker-buildx zip from a repository somewhere, unzipping it, moving it to the right directory, creating/editing text files, and bringing it all together? 


Future new users will appreciate the help... I again apologize for my poor understanding of this. Learning everyday!

Link to comment

I put this in my /boot/config/go file to download and install the newest version at every reboot:

 

# Docker buildx
mkdir -p /usr/libexec/docker/cli-plugins/
BUILDX_VERSION=$(curl -s https://api.github.com/repos/docker/buildx/releases/latest | grep 'tag_name' | cut -d\" -f4)
curl -L https://github.com/docker/buildx/releases/download/${BUILDX_VERSION}/buildx-${BUILDX_VERSION}.linux-amd64 -o /usr/libexec/docker/cli-plugins/docker-buildx
chmod +x /usr/libexec/docker/cli-plugins/docker-buildx

 

Link to comment
  • 1 month later...
Just now, explosionhole said:

why don't I have a /flash directory on my system?

What makes you think you should have one?

 

Perhaps you are getting mixed up with the fact that if set to be visible on the network (by default it is not) this is the share name assigned to the boot drive).

Link to comment

why does your response need to be so confrontational? equally, the poster's instruction did not provide this additional snarky "fact".

 

I am genuinely interested in a technical query. please be (according to your scale) kind. And for posterity so others can find this info.

 

Where is this set? Is there a description or reason for it? am I looking in the Settings panel?

 

Link to comment
2 minutes ago, explosionhole said:

why does your response need to be so confrontational? equally, the poster's instruction did not provide this additional snarky "fact".

Sorry you were upset, but I was trying to find why you thought you should have a ‘flash’ directory in case you had done something on your system that made you think there should be one and it was not showing.

 

Sharing of the boot drive on the network is controlled by clicking on it on the Main tab and then going to the SMB section to make it visible.

Link to comment

So, when I was provided the steps from the Dev above Inwas also confuse, I didn't f8nd a "flash" directory, what I did was shut the system down, pull the unraid usb drive, and plug it into my PC, then I saw what had been explained. Sorry I didn't include that extra info, at the time I just figured well if I figured it out anyone else can lol. 

Link to comment

Your screenshot seems to be related to trying to create a remote share with Unassigned Devices. This is for allowing your Unraid server to connect to shares on other computers.

 

If you want to share your flash drive, click on the flash drive in Main - Boot Device to get to its settings. From there you can configure its SMB settings to allow it to be seen on the network.

 

 

Link to comment

After a good sleep, I finished off the user scripts section, to place the binary into the `/usr/bin/` directory and giving it execute permissions.

 

So from the Unraid terminal, I can now execute the `docker-buildx` binary and with no parameters, I get the basic usage instructions.

 

Final question from me is if I can do a symlink, or similar, so that `docker build ....` would be the same as executing `docker-buildx`? If I follow online guides, or pull from Git repos, etc, I expect they will mostly us the former format.

Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...