Sign inSign up

lerwys/epics_phoebus_alsu

By lerwys

Updated over 3 years ago

EPICS Phoebus for ALSU LLRF

Image
0

418

lerwys/epics_phoebus_alsu repository overview

Dockerfile

# Author: Lucas Russo
# LBNL: Lawrence Berkeley National Lab

ARG EPICS_VERSION=7.0.7
FROM lbnl-atg/epics_phoebus:${EPICS_VERSION}

ARG BUILD_DATE
ARG BUILD_VERSION

ENV DEBIAN_FRONTEND noninteractive

LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.build-date=$BUILD_DATE
LABEL org.label-schema.name="lbnl-atg/phoebus_alsu"
LABEL org.label-schema.description="Debian 11 EPICS Phoebus ALSU docker image"
LABEL org.label-schema.url="https://gitlab.lbl.gov/drivers/FEED"
LABEL org.label-schema.version=$BUILD_VERSION
LABEL org.label-schema.docker.cmd="docker run -it --rm --name=deb11phoebusalsu lbnl-atg/phoebus_alsu /bin/bash"

# Dependencies
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        openssh-client && \
    rm -rf /var/lib/apt/lists/*

# FEED
ARG FEED_VERSION=docker-alsu
ARG [email protected]:drivers/FEED.git
ENV FEED=${EPICS_MODULES}/FEED

# Use ssh mount type to allow commands using ssh to use
# the docker build parameter "--ssh default=~/.ssh/id_ed25519".
# Need to run docker build with: DOCKER_BUILDKIT=1 docker build ...
#
# From: https://docs.docker.com/engine/reference/commandline/buildx_build
# From: https://www.fastruby.io/blog/docker/docker-ssh-keys.html
RUN --mount=type=ssh \
    set -e; \
    mkdir -p -m 0700 ~/.ssh && \
    ssh-keyscan gitlab.lbl.gov >> ~/.ssh/known_hosts && \
    cd ${EPICS_MODULES} && \
    GIT_SSL_NO_VERIFY=true git clone ${FEED_URL} ${FEED} && \
    cd ${FEED} && \
    git reset --hard ${FEED_VERSION}

ENV FEED_DISPLAYS=${FEED}/alsuRfApp/srcDisplay

# USPAS LLRF FW
ARG USPAS_LLRF_VERSION=main
ARG [email protected]:uspas-llrf/uspas_llrf.git
ENV USPAS_LLRF=${EPICS_MODULES}/uspas_llrf

# Use ssh mount type to allow commands using ssh to use
# the docker build parameter "--ssh default=~/.ssh/id_ed25519".
# Need to run docker build with: DOCKER_BUILDKIT=1 docker build ...
#
# From: https://docs.docker.com/engine/reference/commandline/buildx_build
# From: https://www.fastruby.io/blog/docker/docker-ssh-keys.html
RUN --mount=type=ssh \
    set -e; \
    mkdir -p -m 0700 ~/.ssh && \
    ssh-keyscan gitlab.lbl.gov >> ~/.ssh/known_hosts && \
    cd ${EPICS_MODULES} && \
    GIT_SSL_NO_VERIFY=true git clone ${USPAS_LLRF_URL} ${USPAS_LLRF} && \
    cd ${USPAS_LLRF} && \
    git reset --hard ${USPAS_LLRF_VERSION}

ENV USPAS_LLRF_DISPLAYS=${USPAS_LLRF}/epics

ENV PYTHONPATH=${FEED}/src/python:${FEED}/slacRfApp/script/software/dsp
ENV EPICS_CA_AUTO_ADDR_LIST NO
ENV EPICS_CA_ADDR_LIST localhost

RUN set -e; \
    cd ${EPICS_PHOEBUS} && \
    echo "org.phoebus.pv.ca/addr_list=192.168.19.255" > settings.ini && \
    echo "org.phoebus.pv.ca/auto_addr_list=true" >> settings.ini

WORKDIR ${USPAS_LLRF_DISPLAYS}

CMD ["phoebus", "-resource", "waveforms.bob"]

How to run

xhost local:root
docker run --rm -it --name phoebus_alsu --network="host" -e DISPLAY=${DISPLAY} -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.Xauthority:/root/.Xauthority lerwys/epics_phoebus_alsu

Tag summary

Content type

Image

Digest

sha256:5df647409

Size

1 GB

Last updated

over 3 years ago

docker pull lerwys/epics_phoebus_alsu