-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
##### build stage ############################################################## | ||
|
||
ARG TARGET_ARCHITECTURE | ||
ARG BASE=23.9.3 | ||
ARG REGISTRY=ghcr.io/epics-containers | ||
|
||
FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-developer:${BASE} AS developer | ||
|
||
# In a devcontainer this folder is mounted on the host's clone of ioc-adsimdetector | ||
WORKDIR /workspaces/ioc-adsimdetector/ibek-support | ||
|
||
# copy the global ibek files | ||
COPY ibek-support/_global/ _global | ||
|
||
COPY ibek-support/iocStats/ iocStats | ||
RUN iocStats/install.sh 3.1.16 | ||
|
||
COPY ibek-support/asyn/ asyn/ | ||
RUN asyn/install.sh R4-42 | ||
|
||
COPY ibek-support/autosave/ autosave/ | ||
RUN autosave/install.sh R5-10-2 | ||
|
||
COPY ibek-support/busy/ busy/ | ||
RUN busy/install.sh R1-7-3 | ||
|
||
COPY ibek-support/ADCore/ ADCore/ | ||
RUN ADCore/install.sh R3-12-1 | ||
|
||
COPY ibek-support/ADSimDetector/ ADSimDetector/ | ||
RUN ADSimDetector/install.sh R2-10 | ||
|
||
# Make the IOC | ||
RUN ibek ioc generate-makefile | ||
RUN ibek ioc compile | ||
|
||
##### runtime preparation stage ################################################ | ||
|
||
FROM developer AS runtime_prep | ||
|
||
# get the products from the build stage and reduce to runtime assets only | ||
WORKDIR /min_files | ||
RUN bash /epics/scripts/minimize.sh ${IOC} $(ls -d ${SUPPORT}/*/) | ||
|
||
##### runtime stage ############################################################ | ||
|
||
FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-runtime:${BASE} AS runtime | ||
|
||
# get the virtual environment from the developer stage | ||
COPY --from=developer /venv /venv | ||
# add products from build stage | ||
COPY --from=runtime_prep /min_files / | ||
|
||
# install runtime system dependencies, collected from install.sh scripts | ||
RUN ibek support apt-install --runtime | ||
|
||
# add ioc sample startup scripts | ||
COPY ioc ${IOC} | ||
|
||
ENV TARGET_ARCHITECTURE ${TARGET_ARCHITECTURE} | ||
|
||
ENTRYPOINT ["/bin/bash", "-c", "${IOC}/start.sh"] |