Sign inSign up

jeffersonlab/softioc

By jeffersonlab

•Updated almost 4 years ago

EPICS CA soft IOC

Image
1

4.8K

jeffersonlab/softioc repository overview

⁠softioc Docker

Docker image of an EPICS CA⁠ softioc that uses BusyBox to slim image size to about 20MB.



⁠Overview

The container currently uses EPICS version 3.15.8.

⁠Quick Start with Compose

  1. Grab project
git clone https://github.com/JeffersonLab/softioc
cd softioc
  1. Launch Compose⁠
docker compose up
  1. Monitor for PV named hello
docker exec -it softioc camonitor hello
  1. CAPUT value to hello
docker exec softioc caput hello 1

⁠Install

docker pull jeffersonlab/softioc

⁠Configure

The container entrypoint is the softIoc application and the default arguments instruct the IOC to use the database from the bind mount point /db containing a file named softioc.db. Use a volume to provide your own IOC database (or use one of the provided examples) at this mount point:

docker run --name softioc -it -v $(pwd)/examples/hello:/db softioc

Override the arguments to the softIoc command as necessary:

docker run --name softioc -it -v /some/where/else:/db softioc -m user=pklaus -d /db/my.db

In order to access the softioc container channel access ports on the localhost you must publish the exposed ports with the -p flag:

docker run --name softioc -it -v $(pwd)/examples/hello:/db -p 5064:5064/tcp -p 5064:5064/udp -p 5065:5065/tcp -p 5065:5065/udp softioc

Note: Turns out there is no cross-platform way to specify a relative path with a bind mount (Docker CLI Issue 1203⁠). You may need to replace $(pwd) with the absolute path (or perhaps %cd% on Windows). This problem is only with "docker run"; Docker compose doesn't have this issue.

Note: Docker security measures may prevent bind mounts. On Windows for example you must navigate to Settings > File Sharing then authorize the directory to mount.

Debug tips:

# If not running:
docker run --entrypoint /bin/sh softioc
# If already running:
docker exec -it softioc /bin/sh
# --OR attach to EPICS softIoc PID 1 entrypoint process directly
docker attach softioc
# To detach you must use escape sequence CTRL+p CTRL+q

⁠Build

git clone https://github.com/JeffersonLab/softioc.git
cd softioc
docker build -t softioc .

⁠Release

  1. Run docker build and tag release
  2. Push to DockerHub

Tag summary

Content type

Image

Digest

sha256:35969ea7c…

Size

7 MB

Last updated

almost 4 years ago

docker pull jeffersonlab/softioc