This repository contains a Dockerfile named jlinkRemoteServerEmu.dockerfile that builds a container image for running SEGGER's JLinkRemoteServer inside Docker. The image includes a workaround for udev post-install scripts so the J-Link package can be installed in container builds.
- Installs minimal Debian packages required to run SEGGER J-Link tools (
libusb-1.0-0). - Provides a small
udevadmstub during package installation to avoid Docker postinst failures, then restores it. - Installs the appropriate J-Link binary package (.deb) depending on container architecture (
x86_64oraarch64). - Creates an unprivileged
jlinkuser and sets the image entrypoint toJLinkRemoteServer.
Place the SEGGER J-Link Debian packages in the same directory as the Dockerfile before building:
JLink_Linux_V890_x86_64.deb(for x86_64 builds)JLink_Linux_V890_arm64.deb(for aarch64/arm64 builds)
If you don't have these packages, download them from SEGGER's website (segger.com) and put the correct filenames into the build context.
From the directory containing jlinkRemoteServerEmu.dockerfile and the required .deb files, run:
docker build -t my-jlink-image -f jlinkRemoteServerEmu.dockerfile .Below is a concrete example that creates a Docker bridge network and starts three J-Link containers with fixed IPs and explicit serials.
docker network create --driver bridge --subnet=192.168.3.0/24 --gateway=192.168.3.1 jlink-net
docker run -d --rm \
--device=/dev/bus/usb:/dev/bus/usb \
--name jlink100 \
--network jlink-net \
--ip 192.168.3.100 \
my-jlink-image \
-select usb=123456789 -device STM32F103RE -endian little -speed 4000 -if swd
docker run -d --rm \
--device=/dev/bus/usb:/dev/bus/usb \
--name jlink101 \
--network jlink-net \
--ip 192.168.3.101 \
my-jlink-image \
-select usb=234567890 -device STM32F103RE -endian little -speed 4000 -if swd
docker run -d --rm \
--device=/dev/bus/usb:/dev/bus/usb \
--name jlink102 \
--network jlink-net \
--ip 192.168.3.102 \
my-jlink-image \
-select usb=345678901 -device STM32F103RE -endian little -speed 4000 -if swdNotes:
- This example uses the image name
my-jlink-imageand example serials123456789,234567890, and345678901— replace them with your real image name and serials. - Adjust the
--ipaddresses and network subnet if needed for your environment.
Now you can connect to each J-Link Remote Server instance using its assigned IP address and manage multiple J-Link devices in isolated Docker containers by you Debugger or flashing tools. This saves you from using different ports to connect to a remote server without conflicts.