Skip to main content
AI
  • Get started with AI

    • Red Hat AI

      Accelerate the development and deployment of enterprise AI solutions.

    • AI learning hub

      Explore learning materials and tools, organized by task.

    • AI interactive demos

      Click through scenarios with Red Hat AI, including training LLMs and more.

    • AI/ML learning paths

      Expand your Red Hat OpenShift AI knowledge using these learning resources.

    • AI quickstarts

      Focused AI use cases designed for fast deployment on Red Hat AI platforms.

    • No-cost AI training

      Foundational Red Hat AI training.

  • Featured resources

    • Red Hat OpenShift AI
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

Red Hat AI Factory with NVIDIA

Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.

Learn
  • Self-guided

    • Documentation

      Find answers, get step-by-step guidance, and learn how to use Red Hat products.

    • Learning paths

      Explore curated walkthroughs for common development tasks.

    • Guided learning

      Receive custom learning paths powered by our AI assistant.

    • See all learning
  • Hands-on

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

    • Interactive labs

      Learn by doing in these hands-on, browser-based experiences.

    • Interactive demos

      Click through product features in these guided tours.

  • Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics
  • Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
Build
  • Get started

    • Red Hat build of Podman Desktop

      A downloadable, local development hub to experiment with our products and builds.

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

  • Download products

    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products
  • Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset
  • References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
Community
  • Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions
  • Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github
  • Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

Join the Red Hat Developer program

Download Red Hat products and project builds, access support documentation, learning content, and more.

ConsoleDocsSupport Search
New For you

Recommended

We'll recommend resources you may like as you browse. Try these suggestions for now.

  • Product downloads
  • Cheat sheets
  • Red Hat Developer learning portal
  • Developer blog
  • E-books
  • Developer Sandbox
Log in

Get more with a Red Hat Developer account

  • Product downloads
  • Console access
  • Event registration
  • Training & trials
Explore more account benefitsLog in or register

A subscription may be required for some services.

Contact us

Using Podman Compose with Microcks: A cloud-native API mocking and testing tool

April 22, 2021
Nicolas Massé
Related topics:
ContainersKubernetesOpen source
Related products:
Developer ToolsetPodman DesktopRed Hat OpenShift

    Microcks is a cloud-native API mocking and testing tool. It helps you cover your API's full lifecycle by taking your OpenAPI specifications and generating live mocks from them. It can also assert that your API implementation conforms to your OpenAPI specifications. You can deploy Microcks in a wide variety of cloud-native platforms, such as Kubernetes and Red Hat OpenShift. Developers who do not have corporate access to a cloud-native platform have used Docker Compose. Although Docker is still the most popular container option for software packaging and installation, Podman is gaining traction.

    Podman was advertised as a drop-in replacement for Docker. Advocates gave the impression that you could issue alias docker=podman and you would be good to go. The reality is more nuanced, and the community had to work to get proper docker-compose support in Microcks for Podman.

    This article discusses the barriers to getting Microcks to work with Podman and the design decisions we made to get around them. It includes a brief example of using Podman in rootless mode with Microcks.

    Supporting Podman in Microcks

    Podman presented a few design barriers, which the Microcks community had to work around. We'll discuss the barriers and how we worked around them, and what those decisions mean for developers using Podman with Microcks.

    Rootfull or rootless?

    Docker requires running a daemon as root, which observers have long criticized as insecure. Podman adopted a very different architecture: It involves no daemon at all and can run as root (rootfull mode) or as a regular user (rootless mode). Microcks supports Podman in either rootfull or rootless mode.

    Although rootless mode looks very appealing, it does not come without cost. Drawbacks include:

    • Containers have no IP address and no DNS aliases.
    • Port redirection is done in userspace, whereas rootfull mode uses iptables, which is faster.
    • The overlay storage is done in userspace with FUSE, which is slower than the traditional overlayFS mount.

    Still, unless you need high performance or a specific network setup, you can use rootless mode.

    DNS aliases: Still in the way

    Microcks needs proper DNS aliases in place to work properly. The main reason is that Microcks uses the OpenID Connect protocol for user authentication, which involves both user-facing interactions and server-to-server interactions.

    Combined with the quirks and limitations of the other software in the stack (Keycloak, Docker, Podman), this requirement explains why it has always been challenging to get Microcks running without tinkering with the Docker Compose configuration.

    To work around this issue, the community created a shell script that discovers the current machine IP address and hardcodes that address in the podman-compose file.

    To get DNS aliases working, you need to enable the dnsname plugin in the default podman network.

    Networking

    With the rootfull mode in Podman came another challenge: By default, containers can refer to other containers only by their IP addresses. This command re-creates the default podman network and enables the dnsname plugin:

    $ sudo podman network rm podman
    $ sudo podman network create --subnet 10.88.0.0/16 podman
    

    Using Podman Compose with Microcks

    Podman support might not look glorious as presented here, but the benefits of using Podman are worth the effort!

    The rootless mode is the easiest and safest way to get Microcks working with Podman Compose:

    $ git clone https://github.com/microcks/microcks.git
    $ cd microcks/install/podman-compose
    $ ./run-microcks.sh
    Running rootless containers...
    Discovered host IP address: 192.168.3.102
    
    Starting Microcks using podman-compose ...
    ------------------------------------------
    Stop it with:  podman-compose -f microcks.yml --transform_policy=identity stop
    Re-launch it with:  podman-compose -f microcks.yml --transform_policy=identity start
    Clean everything with:  podman-compose -f microcks.yml --transform_policy=identity down
    ------------------------------------------
    Go to https://localhost:8080 - first login with admin/123
    Having issues? Check you have changed microcks.yml to your platform
    
    using podman version: podman version 2.1.1
    podman run [...]

    Rootfull mode requires that you enable the dnsname plugin on the default podman network, as described earlier. Then, you would just run this script with sudo.

    Conclusion

    Getting Microcks to work with Podman was not particularly difficult. We hope this support will help you get started with using Microcks in corporate environments. Read the announcement on microcks.io for more details.

    Last updated: February 7, 2024

    Recent Posts

    • A day in the life of an NVIDIA H100 on Red Hat OpenShift 5

    • Migrate BuildConfigs to builds for Red Hat OpenShift with one plug-in install

    • Run Red Hat Enterprise Linux CoreOS on NVIDIA BlueField DPUs

    • Agent harness engineering: Separating model capabilities from enforcement

    • What's new for developers in Red Hat Enterprise Linux 10.3 and 9.9

    Red Hat Developers logo

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    Red Hat Developer

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility
    Ask AI