-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: main
Are you sure you want to change the base?
Conversation
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
@@ -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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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).