Building docker image - vyos-build [SOLVED]


#1

Hi. I’m following the instructions at
https://wiki.vyos.net/wiki/Building_images_using_vyos-build_Docker_container#Building_vyos-build_Docker_container

In particular
git clone https://github.com/vyos/vyos-build
cd vyos-build/docker
sudo docker build -t vyos-builder .

But the creation keeps failing

W: Failed to fetch http://security.debian.org/debian-security/dists/jessie/updat es/InRelease

W: Failed to fetch http://security.debian.org/debian-security/dists/jessie/updat es/Release.gpg Could not resolve ‘security.debian.org

W: Failed to fetch http://deb.debian.org/debian/dists/jessie/Release.gpg Could not resolve ‘deb.debian.org

W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists…
Building dependency tree…
Reading state information…
Package dialog is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package apt-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package locales is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘dialog’ has no installation candidate
E: Package ‘apt-utils’ has no installation candidate
E: Package ‘locales’ has no installation candidate
The command ‘/bin/sh -c apt-get update && apt-get install -y dialog apt-utils locales’ returned a non-zero code: 100"

Using docker-engine 1.12.6 on a Oracle Linux 6.10.
Any ideas please?
Thanks.


#2

Installed docker-devel.


#3

after starting the vyos-builder docker and running
./configure
make iso

I got after a while:
[2019-05-08 11:59:16] lb binary_linux-image
P: Begin install linux-image…
cp: cannot stat ‘chroot/boot/initrd.img-*’: No such file or directory
P: Begin unmounting filesystems…
P: Saving caches…
Reading package lists…
Building dependency tree…
Reading state information…

when listing /vyos/build, the vyos-1.20-rolling****.iso links to a non existing live-image-amd64.hybrid.iso
Any idea why?
Thanks.


#4

I built it and I started the image inside a VM.
It toke ages but at the end it seams to be working as expected.

My docker instances are running in separate name space (security feature).
I made it to build the Docker image with those instances.
But to build the ISO image I had to use a fresh docker install with regular user name space.


#5

Make sure you’ve Debian backports on the Jessie repos as they’ve stopped being supported. I has this issue too.

If you’re getting a non existent image it means the build has failed. Usually this means a package of some sort wasn’t installed, which makes sense if you’re not using backports.


#6

Thank you so much for the reply. Yes, that solved my problem! Didn’t find any error regarding backports, but maybe it was my fault.

Followed the instructions described at “https://backports.debian.org/Instructions/” and now my .iso file was successfully created.
Thanks!


#7

Nah, it’s not your fault. If I remember correctly something changed due to the software lifecycle quite recently. VyOS have updated the build guide to include this though - https://github.com/vyos/vyos-build - but not on the Wiki yet. Could be good to add that in :wink:

Glad you got it built!