Choose Your Developer Environment#
The tutorials walk through a standard set of developer tools. You can use others if you wish, but support for them is limited at present.
Working with your own code editor#
If you have a preferred code editor you can use it instead of VSCode. We recommend developing Generic IOCs inside a developer container, as the Developer Containers tutorial describes; editors with developer-container support are listed at https://containers.dev/supporting.
epics-containers has been tested with:
VSCode
GitHub Codespaces
Terminal editors such as neovim or emacs work too. As that tutorial’s
note explains, launch the Generic IOC’s developer container with the
devcontainer CLI
rather than by hand, so it picks up the host mounts and other settings from
.devcontainer/devcontainer.json.
To make your editor available inside the developer container, add an
apt install line for it to the developer stage of the Generic IOC’s
Dockerfile.
Using the devcontainer CLI#
The devcontainer CLI builds and launches the same developer container that
VSCode would, but driven entirely from the terminal. This is the route to take
if you use a terminal editor, or want to script your workflow.
Build the Generic IOC first#
Clone your Generic IOC repo and run its ./build script before launching the
container. This pulls in the ibek-support submodules and surfaces any errors
in the container build step up front, where they are easy to read:
git clone <your-ioc-xxx-repo-url>
cd ioc-xxx
./build
Tip
If a support module fails to build, comment it out of the Dockerfile so the
container can build. You can then debug that module interactively from inside
the developer container.
Launch and attach#
From the IOC directory, bring the developer container up. It builds the image if needed and then runs in the background:
devcontainer up --workspace-folder .
# wait for the build to complete; the container is now running in the background
podman ps # confirm it is up
Attach as many shells inside the running container as you need:
devcontainer exec --workspace-folder . bash
Note
The CLI uses --workspace-folder to locate the right container. Point up and
every exec at the same IOC folder (. when you are inside it, or an
absolute path such as /path/to/ioc-xxx from elsewhere), or a mismatch will
start or target the wrong container.
Clean up#
The developer container keeps running in the background until you stop it. There
is no devcontainer down command — the CLI creates an ordinary podman
container, so tear it down with podman directly:
podman ps # find the container's name or id
podman stop <name-or-id> # stop it (keeps the container for a fast restart)
podman rm -f <name-or-id> # stop and remove it completely
To rebuild from scratch on the next launch — for example after editing the
Dockerfile — recreate the container with:
devcontainer up --workspace-folder . --remove-existing-container
Troubleshooting#
Error: spawn docker ENOENT means the CLI cannot find a container engine. The
devcontainer CLI expects docker on the PATH; on a podman host you need
podman configured to provide a docker-compatible command (a docker alias or
the podman-docker shim). Confirm your developer container launches from VSCode
first — if that works, the engine itself is fine and the CLI just needs the
docker entry point. Running ./build first is a good diagnostic, as it
exercises the same engine and submodules.
Otherwise, add export DOCKER_PATH=$(which podman) to your local .bashrc.
When building the container for the first time, if it tries to change ownership of
vscode directories:
chown: changing ownership of '/home/vscode': Invalid argument (os error 22),
add the following to your devcontainer.json "updateRemoteUserUid": false
to avoid remapping of UIDs.