Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 4 additions & 50 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,58 +1,12 @@
# Download Epics
FROM --platform=$BUILDPLATFORM debian:bookworm-slim AS epics-download-extract
SHELL ["/bin/bash", "-c"]
RUN apt-get update && apt-get install -yq wget git
WORKDIR /var/cache
ARG EPICSVERSION=7.0.9
RUN wget -q --show-progress https://epics-controls.org/download/base/base-$EPICSVERSION.tar.gz \
&& mkdir /epics/ \
&& tar -xf base-$EPICSVERSION.tar.gz -C /epics \
&& rm base-$EPICSVERSION.tar.gz

FROM --platform=$BUILDPLATFORM debian:bookworm-slim AS base

FROM base AS base-amd64
ENV EPICS_HOST_ARCH=linux-x86_64

FROM base AS base-386
ENV EPICS_HOST_ARCH=linux-x86

FROM base AS base-arm64
ENV EPICS_HOST_ARCH=linux-arm

FROM base AS base-arm
ENV EPICS_HOST_ARCH=linux-arm

# Now finally choose the right base image:
FROM base-$TARGETARCH AS build-epics
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install --no-install-recommends -yq \
build-essential \
ca-certificates \
curl \
libreadline-dev \
telnet \
&& apt-get clean && rm -rf /var/lib/apt/lists/* && rm -rf /var/cache/apt

WORKDIR /epics
COPY --from=epics-download-extract /epics /epics
ARG EPICSVERSION=7.0.9
RUN mv base-$EPICSVERSION base
RUN cd base && make -j$(nproc)

FROM build-epics AS recsync-base
FROM ghcr.io/epics-containers/epics-base-developer:7.0.9ec5 AS recsync-base

WORKDIR /recsync
COPY . /recsync/
RUN mv docker/RELEASE.local configure/RELEASE.local
ENV EPICS_ROOT=/epics
ENV EPICS_BASE=${EPICS_ROOT}/base
RUN make
RUN ln -s /epics/support/configure/RELEASE configure/RELEASE.local && \
make

FROM recsync-base AS ioc-runner

WORKDIR /recsync/bin/${EPICS_HOST_ARCH}

CMD ./demo /recsync/iocBoot/iocdemo/st.cmd
CMD ["./demo", "/recsync/iocBoot/iocdemo/st.cmd"]
5 changes: 2 additions & 3 deletions client/ioc-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@

services:
ioc1:
build: ../client
build: .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not really need this change, it just looked wrong.

(I'm aware that relative paths in nested compose files have odd behaviour)

environment:
- IOCSH_NAME=IOC1
tty: true
stdin_open: true
networks:
- net-1-recc-1

networks:
net-1-recc-1:
driver: bridge
2 changes: 0 additions & 2 deletions client/iocBoot/iocdemo/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
## You may have to change demo to something else
## everywhere it appears in this file

< envPaths

## Register all support components
dbLoadDatabase("../../dbd/demo.dbd",0,0)
demo_registerRecordDeviceDriver(pdbbase)
Expand Down
Loading