Skip to content

BareMetalTestLab/multi-ip-jlink-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

J-Link Remote Server Docker (Emulated)

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.

What this Dockerfile does

  • Installs minimal Debian packages required to run SEGGER J-Link tools (libusb-1.0-0).
  • Provides a small udevadm stub during package installation to avoid Docker postinst failures, then restores it.
  • Installs the appropriate J-Link binary package (.deb) depending on container architecture (x86_64 or aarch64).
  • Creates an unprivileged jlink user and sets the image entrypoint to JLinkRemoteServer.

Required files (build context)

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.

Build

From the directory containing jlinkRemoteServerEmu.dockerfile and the required .deb files, run:

docker build -t my-jlink-image -f jlinkRemoteServerEmu.dockerfile .

Run examples

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 swd

Notes:

  • This example uses the image name my-jlink-image and example serials 123456789, 234567890, and 345678901 — replace them with your real image name and serials.
  • Adjust the --ip addresses and network subnet if needed for your environment.

Profit

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors