-
Notifications
You must be signed in to change notification settings - Fork 28
use epics-containers base image in client Dockerfile #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gilesknap
wants to merge
3
commits into
ChannelFinder:master
Choose a base branch
from
gilesknap:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -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"] |
This file contains hidden or 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 |
|---|---|---|
| @@ -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 | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll need to check if this breaks https://github.com/ChannelFinder/recsync/blob/master/server/tests/docker/test-bash-ioc.yml
There was a problem hiding this comment.
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)