-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[opipcplus] Problem with compilation in Docker container #385
Comments
rootfs cache file is too small, presumably corrupted. Remove output/cache/rootfs and run again. |
I advise against doing image builds in docker. Docker containers are fine for doing armbian kernel builds, but problematic for image builds. The armbian image build process relies on creating loopback image mounts. I spent a day and a half troubleshooting the process... Ultimately getting the loopback kernel modules to create proper loopback devices within the container repeatedly proved to be unreliable. (I was using CentOS7 as my docker host with a ubuntu 14.04 Docker container for the build) Your error is very familar to me. If you take a look at your container for another share you'll probably see that the sdcard folder is not mounted to a loopback to device. |
loop device is not required at rootfs cache creation stage, so it's probably an |
@lanefu unfortunately I think avoiding using containers is not good way to go. Containers should work mainly because people that do many builds want to have separate embedded development environment. I hate idea of installing something in my system because Armbian requires that. I do a lot of builds from scratch, buidroot and always try to use contrainers because it give me isolation. I'm willing to help as much as I can to make contrainers work fine with Armbian. @zador-blood-stained not sure about |
@pietrushnic So, please, delete rootfs cache and run building again. If there will be any errors, please post log files from |
@zador-blood-stained my host is Debian sid. I did completely clean test and it fails on my 8GB machine, but I retried that with 16GB workstation and build passed. I think that default procedure for building in docker should be changed and output of build should be placed on hard disk by mounted volume not kept in container. I think this issue can be closed, but there should be guide on building in container. Where I can place that ? |
@zador-blood-stained I was too fast with that:
Build finishes fine, but it seem to not be correct after compressing it I have 1.5MB |
|
@pietrushnic Your hitting the loopback device problem.. it's right there in your console output:
It's a critical step. Its failure makes your image incomplete. You have to make the loopback mounts work. Ideologically, I agree with you.. containers should work for building images. The reality is that once you've pushed your container to requiring privileged mode, the deploy anywhere paradigm of docker containers is lost. The constraints become the capability of the docker host. Repeatability is lost. You won't be able to use it in any container-only hosting service such as on AWS or google compute engine. I do admire your desire to overcome. Loopback is the hurdle if you want to tackle it. If you do some searching you'll see others struggling with loopback devices inside of containers. Its not a unique scenario. See my post here for a few tricks to improve your luck with building in a container. Please share your technique if you come up with a repeatable solution. |
@pietrushnic |
@zador-blood-stained I followed
Looks like I will try image tomorrow and let you know. |
If there still are errors when building on any HW configuration, I would like to see the logs and full console output. It should not depend on available RAM size in any case.
It may be broken for some configurations, but it's not essential and it shouldn't affect anything. |
@zador-blood-stained it still fails on my 8GB Debian sid laptop: http://paste.ubuntu.com/18166338/ Image build from your I tried to change approach today by using volume and local repository:
Build command:
|
it should be
Do you use Docker and Edit: I see that Xenial is detected in your logs, but I don't see a message about detecting Docker virtualization (which exists only in docker-test branch) Edit 2: You need to add/edit |
There is no
I will try forcing In case of |
It definitely says
|
@zador-blood-stained ok, sorry, I thought more about |
I've got to add that I've found that LXC works better, but if you're not on ubuntu, (arch?) systemd-nspawn seemed to work best for me in the end. Unforunatley docker containers are subject to all of the wierdness of docker containers :/. |
I tried to follow, at Docker can not build an image.
|
@kometchtech |
Thanks for the reply. However, which seems far less errors.
PostScript: |
Can I see full build log? This suggests that there were errors before that line.
I'll adjust some things later. |
make sure you get a log so. |
I pushed some container-related fixes, please test and report if building process works better now. |
Hi, I've been having the same issues building an image within a docker container, here's what I've tried:
The same error with |
@lenormf Please try creating a container with Xenial x64 system inside, try out building and provide full build log and terminal output, I need to be sure that container detection properly works. |
The build on a fresh I've uploaded the script's output and the actual debug log, after checking that the image is working properly on an SD card (which it does). I used
I haven't tried anything else (kernel branch, |
Thanks, there are still some issues with installation of additional packages, and now I am aware of this. |
Closing since base functionality works based on reports. Documentation should be updated to recommend using Xenial build host inside containers. |
Resolves Issue [armbian#385](armbian#385)
I also meet your error with centos7 host. I reslove it my updating kernel to 5.4 from elrepo. |
Compilation of OragePi PC Plus in Docker container fails:
For
default
I have very similar issues.Build log:
Any idea what can be wrong ?
The text was updated successfully, but these errors were encountered: