Page MenuHomeVyOS Platform

Separate out build-host setup shell commands from Dockerfile to shell script
Open, WishlistPublicFEATURE REQUEST

Description

I am using VirtualBox, rather than Docker, to create an environment build vyos for the i386 architecture.

I extracted the RUN commands in the Dockerfile - they are really useful to get Debian setup.

Can I suggest that the RUN commands are extracted from the Dockerfile and put in a shell script instead (scripts/setup-build-env ?) and then have the Dockerfile call the shell script?

Are there any disadvantages to doing that?

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close

Event Timeline

There are no disadvantages in doing so. Any contribution is welcome.

c-po triaged this task as Wishlist priority.Jan 22 2019, 6:53 AM
c-po edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.2 Crux.

I have taken a look at the steps for moving the commands into a separate shell script.

  • Docker does not allow you to reference scripts to run that are higher up in the directory structure than the Dockerfile (you can't use ..). This means that the Dockerfile would have to be moved up to the root directory. This might not be a concern, given that using docker is the default/preferred way of building VyOS.
  • A major disadvantage of having a single RUN command is that if any step fails, you have to start the whole process again. Given that quite a large number of large packages need to be downloaded as part of the process, this is problematic and would make development painful.
  • I wonder if it would be possible to capture the list of build dependencies automatically by extracting them automatically from the debian/control files within the submodules. This could then be used to generate the Dockerfile as well as a shell script.