Skip to content

Commit 813f3d8

Browse files
ioc: copy locally installed software from build stages.
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
1 parent 0c7694d commit 813f3d8

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
@@ -6,6 +6,10 @@
66

77
* base: add lakeshore340 module. by @guirodrigueslima in
88
https://github.com/cnpem/epics-in-docker/pull/123
9+
* ioc: copy locally installed software from build stages. by @henriquesimoes in
10+
https://github.com/cnpem/epics-in-docker/pull/55
11+
* This allows the IOC build phase to install custom software, available at
12+
runtime, under `/usr/local` tree for all targets.
913

1014
## v0.14.1
1115

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ LABEL br.lnls.epics-in-docker.rundir=${RUNDIR}
7171
LABEL br.lnls.epics-in-docker.target="no-build"
7272

7373
COPY --from=pruned-build /opt /opt
74+
COPY --from=pruned-build /usr/local /usr/local
7475

7576

7677
FROM build-image AS build-stage
@@ -117,6 +118,7 @@ LABEL br.lnls.epics-in-docker.rundir=${RUNDIR}
117118
LABEL br.lnls.epics-in-docker.target="dynamic-link"
118119

119120
COPY --from=dynamic-build /opt /opt
121+
COPY --from=dynamic-build /usr/local /usr/local
120122

121123

122124
FROM build-stage AS static-build
@@ -137,3 +139,4 @@ ARG REPONAME
137139
LABEL br.lnls.epics-in-docker.target="static-link"
138140

139141
COPY --from=static-build /opt/${REPONAME} /opt/${REPONAME}
142+
COPY --from=static-build /usr/local /usr/local

0 commit comments

Comments
 (0)