Docker DCMTK GDCM with donnimsipa/docker-dcmkit

Donni Maulana Sipa
3 min readOct 26, 2024

--

Creating and sharing a Docker image has always been a goal of mine, and I’m excited to introduce my first Docker Hub image! Named donnimsipa/docker-dcmkit, this image focuses on DICOM operations, imaging tools, and essential network utilities. In this post, I’ll walk through what donnimsipa/docker-dcmkit offers, how to use it, and why it might be the right fit for your DICOM and networking tasks.

Artikel dalam bahasa indonesia tersedia disini!

Photo by Rubaitul Azad on Unsplash

Overview of donnimsipa/docker-dcmkit

donnimsipa/docker-dcmkit is built on Debian stable-slim, chosen for its balance of lightweight and flexibility. The image includes tools specifically useful for DICOM handling and networking tasks, such as:

  • DCMTK (optional): For DICOM network file handling and transfers.
  • GDCM (optional): Additional imaging tools to extend DICOM capabilities.
  • Networking Utilities (optional): Includes curl, ping, traceroute, and others.

This flexible image configuration means you can customize the build to include only the tools you need, making it efficient and versatile for various use cases.

Getting Started

System Requirements :

To use docker-dcmkit, ensure Docker is installed on your system. Here’s what you’ll need:

  • Docker Version: 20.10.7 or newer
  • OS Compatibility: Linux, macOS, or Windows

Building the Image with Customizable Arguments

The image offers several build arguments to add the tools you want:

  • DCMTK (default: false): Set to true to include DCMTK.
  • GDCM (default: false): Set to true to include GDCM tools.
  • NET (default: false): Set to true to install network tools such as curl, traceroute, etc.

Example Commands

1. Basic Build (You will get ImageMagick only)

docker build -t docker-dcmkit .

2. Build with DCMTK and GDCM

docker build -t docker-dcmkit . --build-arg DCMTK=true --build-arg GDCM=true

3. Build with All Tools
To include DCMTK, GDCM, and network tools:

docker build -t docker-dcmkit . --build-arg DCMTK=true --build-arg GDCM=true --build-arg NET=true

Running the Image

After building, you can run the container as follows. Here’s a basic command to start it interactively:

docker run -it --rm docker-dcmkit

Downloading and Using the Pre-Built Image

You can download the image directly from Docker Hub! Here’s how to get specific versions with the required tools:

  • DCMTK, GDCM, and network tools:
docker pull donnimsipa/docker-dcmkit:1.0-dcmtk-gdcm-net
  • With DCMTK and GDCM:
docker pull donnimsipa/docker-dcmkit:1.0-dcmtk-gdcm
  • With DCMTK and Network tools:
docker pull donnimsipa/docker-dcmkit:1.0-dcmtk-net
  • With GDCM and Network tools:
docker pull donnimsipa/docker-dcmkit:1.0-gdcm-net
  • With DCMTK only:
docker pull donnimsipa/docker-dcmkit:1.0-dcmtk
  • With GDCM only:
docker pull donnimsipa/docker-dcmkit:1.0-gdcm

These tags ensure that only the necessary tools are included in your image, making it easy to tailor to your specific needs.

DockerHub Setup and Automation

Using GitHub Actions for automated builds and pushes to DockerHub, I created tags that specify the included tools. So, whenever a new version is tagged in GitHub, several combinations of images are built and pushed with tags like -dcmtk, -gdcm, and -net.

Future Improvements

As I continue learning, I plan to refine this Docker image, adding more features and documentation to make it even more user-friendly. Contributions are welcome!

Photo by Ian Taylor on Unsplash

Reflection

This project marks a milestone in my journey with Docker. Releasing my own image to Docker Hub feels rewarding, and I hope donnimsipa/docker-dcmkit serves as a helpful tool for anyone working with DICOM and network utilities. It’s only the beginning, and I’m excited to keep learning and building!

Thank you for reading until the end. What do you think of this article? Please share your feedback in the comments below.

Check my other interesting articles here!

--

--

No responses yet