Docker build node, do we have one?


#1

I want to build couple things for Vyos but I prefer to use a docker build node rather then a VM.
Anyone bothered to create one?
For me the difference in build time ontop of a docker is 10-20 times faster then a VM.


#2

I put this together a while ago and it worked well.

However, I just tested building it again a moment ago and debian mirrors look to have archived squeeze so apt is failing. Adapt as necessary :slight_smile:

Regards,

Chris


#3

Hoo it’s you!!!
I adapted it and wasn’t sure if I’m on the right track!


#4

Based on your gist, I did some more testing. It’s getting further in buiild if you add what is documented here: https://wiki.debian.org/DebianSqueeze

ADD apt.conf /etc/apt/apt.conf

where apt.conf contains:
Acquire::Check-Valid-Until false;

I’ll update you when my build errors or completes :slight_smile:


Current issue is I can’t bring in squeeze-backports which contains a newer version of squashfs (4.2) required to build vyos.

root@06e8a70b2930:/etc/apt# apt-get update
Hit http://security.debian.org squeeze/updates Release.gpg
Hit http://security.debian.org squeeze/updates Release                                                  
Get:1 http://security.debian.org squeeze/updates/main Sources [173 kB]                                  
Get:2 http://security.debian.org squeeze/updates/main amd64 Packages [455 kB]                           
Hit http://archive.debian.org squeeze Release.gpg                                                       
Hit http://archive.debian.org squeeze-lts Release.gpg                       
Hit http://archive.debian.org squeeze Release  
Hit http://archive.debian.org squeeze-lts Release                     
Get:3 http://archive.debian.org squeeze/main amd64 Packages [8370 kB] 
Get:4 http://archive.debian.org squeeze-lts/main amd64 Packages [390 kB]
Ign http://backports.debian.org squeeze-backports Release.gpg                                           
Ign http://backports.debian.org squeeze-backports Release
Ign http://backports.debian.org squeeze-backports/main amd64 Packages
Err http://backports.debian.org squeeze-backports/main amd64 Packages
  Undetermined Error [IP: 5.153.231.4 80]
Fetched 4 B in 52s (0 B/s)
W: Failed to fetch http://backports.debian.org/debian-backports/dists/squeeze-backports/main/binary-amd64/Packages.bz2  Undetermined Error [IP: 5.153.231.4 80]

E: Some index files failed to download, they have been ignored, or old ones used instead.

#5

Can you say something about the results?


#6

Oh sorry! The last message I posted about not able to get squeeze-backports working remains the current state. I can’t find a working mirror for squeeze-backports, and a newer version of squashfs is required for the build to succeed. The exact filename needed is ‘squashfs-tools_4.2-4~bpo60+1_amd64.deb’. I’ve emailed debian mirrors to see if they can dig it out somewhere, otherwise I don’t think it will be possible until we can get a 4.2 squashfs package.


#7

What Dockerfile are you using?
Can you pastebin the docker build output?
For me it works pretty good.
See the output of the Dockerfile I am using:
http://paste.ngtech.co.il/p0epps9ho/9haq6q/raw

Did you tried to use my file and move on from there? or use your old file with little modification?


#8

Any update?


#9

I didn’t spend any further time looking at it :frowning:

I’m building your dockerfile now and will see what I can work out.

I’ve actually just spun up the beta for some labbing I’m doing and see it’s looking quite progressed. Debian 8, kernel 4.4, systemd. Haven’t tracked it too closely to know how close they are to feature parity, stability and release data but hopefully the use of the term Beta suggests it’s close :slight_smile:


#10

Hi elico,

Check out https://github.com/cgb/vyos-build-iso-docker

The container builds successfully and I’ve been able to build lithium and helium from the container. Logs in ‘logs’ dir show the build logs of everything. See how that goes.

Now need to update for the newer build method: https://github.com/vyos/vyos-build :slight_smile:


#11

Hello cgb
Thanks for sharing your work!
Feel free to join us on https://phabricator.vyos.net if you are not already there
and ask questions if any(i’m syncer there too)
If you are willing to maintain this work, it’s easily can be official vyos docker image
Thanks for participation!


#12

I suppose we may want to have two versions of it, one for the legacy VyOS (helium) and one for the vyos-build one.
I’ll read your scripts, perhaps we should make that an official part of VyOS repos.