Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ioc: copy locally installed software from build stages. #55

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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).

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 [1] 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).

[1]: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s09.html
CHANGES.md Show resolved Hide resolved
@@ -37,6 +37,7 @@ ENTRYPOINT ["./entrypoint"]
FROM base AS no-build

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

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
Collaborator

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.

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.

2 participants