create the docker file for a debian:jessie container with all the dependencies to build VyOs 1.2.x
Description
Details
- Difficulty level
- Unknown (require assessment)
- Version
- -
- Why the issue appeared?
- Will be filled on close
Event Timeline
I've attached a docker file. It must be run with the --privileged flag for chroot to work.
thank you for this.
I would suggest to install more dependencies using this docker file. The complete list of what I think we should use is:
squashfs-tools # Required for squashfs file system git # Required, for cloning the source autoconf # Required, for generating build scripts dpkg-dev # Required, used in build scripts live-helper # Required, for ISO build syslinux # Required, for ISO build genisoimage # Required, for ISO build make # Required, for ISO build lsb-release # Required, used by configure script ssh # Optional, for cloning over SSH sudo # Optional, ISO build requires root privileges fakechroot # Required, for ISO build devscripts # Optional, for building submodules (kernel etc) kernel-package # Optional, for building the kernel libtool # Optional, for building certain packages (eg vyatta-op-vpn) libglib2.0-dev # Optional, for building vyatta-cfg libboost-filesystem-dev # Optional, for building vyatta-cfg libapt-pkg-dev # Optional, for building vyatta-cfg flex # Optional, for building vyatta-cfg bison # Optional, for building vyatta-cfg libperl-dev # Optional, for building vyatta-cfg libnfnetlink-dev # Optional, for building vyatta-cfg-vpn vim # Optional, vim, vi, nano or other text editor
Also it will help if the container will have mapped at start a volume on the localhost, this will help exporting to the "external" world the iso images built using this docker node.
I have updated the docker file for all the above packages and I've attached it here.
For me it will make sense to have the docker file in github as part of vyos-build repository. What do you think?
I've created this pull request for Dockerfile to vyos-build repository
https://github.com/vyos/vyos-build/pull/15/commits/428c73d96ff745ba61ba834d9d2a42d5dc8ed5cd
The vyos-build repo makes sense. We might want to move our comments at the top of the Dockerfile to a readme since they are runtime related and not build related. It might also make sense to add your comments on why to include each package in the Dockerfile as well.
And you don't need sudo because the container is running as root. Why do you want a text editor in a docker image?
if we setup the volume as working dir inside the container the mknod function during the make iso process will fail if the docker host is MacOs or Windows.
The error is "mknod: Function not implemented " and is related to how docker engine is implemented to run on Mac and Windows systems
I created the following pull request to simplify the docker build process:
https://github.com/vyos/vyos-build/pull/23
I tested setting the volume as the working dir with the latest docker version on MacOS and did not see the mknod issue. It appears to have been implemented.
I misunderstood the issues @mtudosoiu was talking about. Disregard the above pull request.
New pull request with Linux specific changes:
https://github.com/vyos/vyos-build/pull/24