combust-labs / firebuild

Convenience of containers, security of virtual machines
https://combust-labs.github.io/firebuild-docs/
GNU Affero General Public License v3.0
97 stars 7 forks source link

When building from Dockerfile, add an option to select a named stage as a build target #42

Closed radekg closed 3 years ago

radekg commented 3 years ago

Today, firebuild assumes that an unnamed stage exists in the Dockefile and will not build if it does not exist. However, having a named stage as the only stage in the Dockerfile is perfectly fine. There are two options possible and both can be supported equal:

  1. if the Dockerfile contains a single stage and the stage is named, build it
  2. if there are multiple stages and no final unnamed stage, allow specifying the --dockerfile-stage=string and build that stage as the rootfs