Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

My advice on why you should build containers on your PC

September 1, 2022
Don Schenck
Related topics:
ContainersDeveloper ToolsKubernetesMicroservices
Related products:
Developer SandboxRed Hat OpenShiftRed Hat OpenShift Local

Share:

    In this article, I will present options for building containers that will run in Kubernetes and Red Hat OpenShift. There are many reasons against development in the environment that will ultimately run the container, such as cost, speed, tooling, and so on. Creating a container that works on your PC requires a local development environment that gives you the complete experience of coding, building, debugging, and running—and then pushes all pieces of the container to a host or cloud service. The best way to describe this process is tantamount to encapsulating your entire software building experience into one file and then sending it off to a server.

    Container development offers a new way of thinking about software development. It is an application development model in which you decide which operating system and runtimes run your application, and which libraries to include. A software container holds the application, libraries, runtimes, operating system, as well as specifications for the network port, environment variable values, and more.

    3 Options for building containers on a PC

    I will provide solutions and better alternatives to developing in the same environment that runs the container. The following sections describe three options for building containers on a local desktop or laptop:

    1. Docker Desktop is the most common environment

    Docker Desktop is the most common environment for building containers on your PC for good reason. It has been around the longest, and it’s pretty much synonymous with containers. All you have to do is install it on your system running Windows, macOS, or Linux (Debian, Fedora, and Ubuntu are supported).

    In addition, Docker Desktop is the only container-building solution that supports containers that run on Microsoft Windows. If you want to build your legacy Windows applications on your PC for Kubernetes or OpenShift, you must use Docker Desktop.

    There are a few pros and cons to choosing Docker Desktop:

    Pros:

    • Very popular and common.
    • Can build Windows containers.

    Cons:

    • It might cost you money, depending on your company's size and needs.
    • Runs a daemon on your machine.

    2. The pros and cons of Podman Desktop

    You will find free and open source alternatives for many software development tools. In this case, the alternative to Docker Desktop is Podman Desktop. Podman is the tool I use and recommend. It bills itself (on the website) as "Fast and Light, Open, Simple" with an "Extensible Workflow."

    Pros:

    • Free and open source.
    • Runs on Windows, macOS, and Linux.
    • No daemon.

    Cons:

    • Cannot build Windows containers.

    I suggest you pick up a free copy at the Podman Desktop website and start building container images today.

    3. Building with Red Hat OpenShift Dev Spaces

    Last but not least, Red Hat OpenShift Dev Spaces (formerly Red Hat CodeReady Workspaces) is the wildcard in the mix. OpenShift Dev Spaces is a browser-based IDE that runs in an OpenShift cluster. Yes, that means you need access to an OpenShift cluster, which may be a show-stopper. You might find that this is the best all-around solution.

    This option requires a completely different approach to building a service. Initially, you will build a CI/CD system with all the OpenShift objects required, such as DeploymentConfig, secrets, service, and route. This may seem like backward thinking, but you will eventually need all these objects, so why do it not now?

    Configuring the CI/CD system requires a bit more work, but the payoff is huge. You will be able to do robust development, coordinate multiple developers' efforts, and automate many build tasks.

    Dev Spaces is convenient because it runs in the browser. This practice seemed odd at first to me. But once I decided to run my browser in full-screen mode (by pressing F11), I quickly forgot that I was in a browser. The response is snappy and familiar—Visual Studio Code in a browser.

    You can build and debug your code right there in the browser. There is a way to build a container in the browser-based IDE as well, but it isn't obvious. We will cover that approach in a future article. For now, let's assume this cycle:

    Build and test and debug → Push to git repo → Trigger CI/CD builds → Run in your Kubernetes/OpenShift cluster

    You can now switch from any machine (Mac, Windows, Linux, Chromebook, iPad Air, etc.) to another machine. All you need is the URL to your project. You don't need to install anything.

    Pros:

    • Portable across any platform that can run a modern browser.
    • Forces you to use a CI/CD system.
    • Nothing to install.

    Cons:

    • You must have access to an OpenShift cluster. (Hint: You can get free access at Developer Sandbox for Red Hat OpenShift.)
    • Forces you to use a CI/CD system.
    • Container builds take longer as you wait for the CI/CD system to do its thing.
    • You are not running your containers locally; they are running in OpenShift.

    This is a pretty slick way of working once you get accustomed to it. This solution pays off in the long run. You can learn more about it at the Dev Spaces website.

    Which cluster to use?

    Once you have established your local container development environment, you will most likely need a Kubernetes cluster where you can run multiple services that, together, comprise the system you are creating. Along with the development environment and cluster, it is a great idea to have a CI/CD system that builds and tests the application and flows into the cluster. You want to get to the point where you push your code to a Git repository, and the application automatically builds and lands in your cluster.

    Of course, if you use the Dev Spaces service, you already have a cluster. If not, here are four alternatives:

    1. Your organization's cluster

    This is the gold standard. If your organization has a Kubernetes or OpenShift cluster, and if there is namespace in which you can run containers, you have the best option. Build, run, test, and debug on your machine, then push the container to the cluster. Or you can push your code to your CI/CD for it to end up in your cluster, using Dev Spaces.

    2. Minikube

    Minikube is a small Kubernetes instance that runs on your machine. It takes up some memory and CPU resources, but you get complete control over the cluster in exchange. This is great for a quick cycle of code-build-debug-test.

    3. Red Hat OpenShift Local

    Red Hat OpenShift Local (formerly called Red Hat CodeReady Containers) is similar to Minikube in that it runs on your local machine. The most significant difference should be obvious—running OpenShift versus Kubernetes with Minikube. But OpenShift Local is also Kubernetes under the covers. You can treat this as a Kubernetes cluster if you are not developing for OpenShift. You can also build for OpenShift and get some of its many benefits.

    4. Developer Sandbox for Red Hat OpenShift

    This solution costs you nothing and takes no CPU cycles from your PC. This is the same model as using your organization's cluster, but there are some limitations to remember:

    • It's intended as a learning environment, so the amount of RAM and disk space is limited. You will get out-of-memory (OOM) errors eventually. I know this from experience.
    • Your free trial expires after 30 days. Yes, you can renew, but this isn't an ideal situation.
    • The Developer Sandbox is a free offering from Red Hat. How long will it be around? Who knows?

    This option works well if you are just getting started, especially if you are creating a proof-of-concept application. However, Developer Sandbox is not a long-term solution.

    You can join the Red Hat Developer Program for free and get free access to Developer Sandbox for Red Hat OpenShift.

    Cost-free container development

    Start building container images and running them on Kubernetes or OpenShift without spending any money. I hope my advice inspires you to learn, experiment, and move forward. On top of everything else, the process is fun too.

    Last updated: June 11, 2025

    Related Posts

    • Making environment variables accessible in front-end containers

    • Command-line cluster management with Red Hat OpenShift's new web terminal (tech preview)

    • Automate integration CI/CD process

    • The present and future of CI/CD with GitOps on Red Hat OpenShift

    Recent Posts

    • Assessing AI for OpenShift operations: Advanced configurations

    • OpenShift Lightspeed: Assessing AI for OpenShift operations

    • OpenShift Data Foundation and HashiCorp Vault securing data

    • Axolotl meets LLM Compressor: Fast, sparse, open

    • What’s new for developers in Red Hat OpenShift 4.19

    What’s up next?

    Download OpenShift for .NET Developers and learn techniques for building, testing, and debugging .NET applications within the Red Hat OpenShift environment

    Get the e-book
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    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

    Red Hat legal and privacy links

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

    Report a website issue