Skip to content

Conversation

@henriquesimoes
Copy link
Collaborator

Software, other than shared libraries, may be built in the first stages, but are currently not available in the resulting IOC image. Copy the entire /usr/local tree in all IOC stages, so that locally installed binaries and configuration can be usable at runtime.

This allows us to build custom versions of applications during build phases and install them at IOC images, centralizing and making it easier to track how they are built. In addition, IOCs can also install custom files which will be available at runtime in a known location. Still, IOCs themselves can also be installed in FHS-compliant paths inside the container as any other packaged software, allowing them to make use of tools based on system-installed artifacts (such as env executable discovery).

Dockerfile Outdated
FROM base AS no-build

COPY --from=build-image /opt /opt
COPY --from=build-image /usr/local /usr/local
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have scripts here which are only relevant for the image build phase? 🤔
Like lnls-get-n-unpack

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. But after-build stages wouldn't be aware of such things. We must remove everything (including lnls-get-n-unpack) beforehand if we don't want it to be in the final image, otherwise we won't shrink the image size (which is related to #19).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it makes sense to wait for #59 before merging this. What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with it.

Extra software may be built in the first stages, but are currently not
available in the resulting IOC image. Copy the entire `/usr/local` tree
in all IOC stages, so that locally installed binaries, libraries and
configuration files can be used at runtime.

This allows us to build patched versions of tools (e.g. procServ) during
build phases and install them at IOC images, centralizing and making it
easier to track how they are built.

In addition, IOCs can also install custom files which will be available
at runtime in a known location. Also, IOCs themselves can also be
installed in FHS-compliant paths [1] inside the container as any other
packaged software, allowing them the use of conventional system software
in a straightforward manner (such as `env` executable discovery).

[1] https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s09.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants