diff --git a/client/Dockerfile b/client/Dockerfile index 5baf8c9..cf1fed8 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -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"] diff --git a/client/ioc-compose.yml b/client/ioc-compose.yml index 881c4f5..f9a6038 100644 --- a/client/ioc-compose.yml +++ b/client/ioc-compose.yml @@ -1,13 +1,12 @@ - services: ioc1: - build: ../client + build: . environment: - IOCSH_NAME=IOC1 tty: true + stdin_open: true networks: - net-1-recc-1 - networks: net-1-recc-1: driver: bridge diff --git a/client/iocBoot/iocdemo/st.cmd b/client/iocBoot/iocdemo/st.cmd index 85594c3..fdea222 100755 --- a/client/iocBoot/iocdemo/st.cmd +++ b/client/iocBoot/iocdemo/st.cmd @@ -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)