Skip to content

Commit 3dbbf29

Browse files
ioc: copy locally installed software from build stages.
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
1 parent d595fd1 commit 3dbbf29

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
https://github.com/cnpem/epics-in-docker/pull/42
99
* ci: add reusable job for IOC images. by @ericonr in
1010
https://github.com/cnpem/epics-in-docker/pull/49
11+
* ioc: copy locally installed software from build stages. by @henriquesimoes in
12+
https://github.com/cnpem/epics-in-docker/pull/55
13+
* This allows the IOC build phase to install custom files, available at
14+
runtime, under `/usr/local` tree for all targets.
1115

1216
### Bug fixes
1317

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ ENTRYPOINT ["./entrypoint"]
3737
FROM base AS no-build
3838

3939
COPY --from=build-image /opt /opt
40+
COPY --from=build-image /usr/local /usr/local
4041

4142

4243
FROM build-image AS build-stage
@@ -70,6 +71,7 @@ RUN make distclean && make -j ${JOBS} && make clean && make -C ${RUNDIR}
7071
FROM base AS dynamic-link
7172

7273
COPY --from=dynamic-build /opt /opt
74+
COPY --from=dynamic-build /usr/local /usr/local
7375

7476

7577
FROM build-stage AS static-build
@@ -87,3 +89,4 @@ FROM base AS static-link
8789
ARG REPONAME
8890

8991
COPY --from=static-build /opt/${REPONAME} /opt/${REPONAME}
92+
COPY --from=static-build /usr/local /usr/local

0 commit comments

Comments
 (0)