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

Red Hat OpenShift 4 on your laptop: Introducing Red Hat CodeReady Containers

September 5, 2019
CodeReady Containers Team
Related topics:
ContainersDeveloper ToolsKubernetes
Related products:
Developer ToolsRed Hat OpenShift LocalRed Hat OpenShift

Share:

    Note: As of May 2022, Red Hat CodeReady Containers is now Red Hat OpenShift Local. Read about the changes here: Developer tools rebrand, say farewell to CodeReady name

    Red Hat CodeReady Containers brings a minimal, preconfigured Red Hat OpenShift 4.1 or newer cluster to your local laptop or desktop computer for development and testing purposes. CodeReady Containers supports native hypervisors for Linux, macOS, and Windows 10. 

    CodeReady Containers is designed for local development and testing on an OpenShift 4 cluster. For running an OpenShift 3 cluster locally, see Red Hat Container Development Kit (CDK) or Minishift.

    In this article, we’ll look at the features and benefits of CodeReady Containers, show a demo of how easy it is to create a local Red Hat OpenShift 4 cluster, and show how to deploy an application on top of it.

    Prerequisites

    CodeReady Containers requires the following minimum system resources to run Red Hat OpenShift:

    • 4 virtual CPUs (vCPUs)
    • 8 GB of memory
    • 35 GB of storage space

    You will also require the native hypervisor for your host operating system. CodeReady Containers currently supports libvirt for Linux, HyperKit for macOS, and Hyper-V for Windows.

    Here's a brief walk-through of getting the bits, all the way through getting an app deployed.

    Download & install

    You can download CodeReady Containers from the Red Hat CodeReady Containers product page. To install CodeReady Containers, extract the downloaded archive its contents, and add the extracted crc binary to your PATH environment variable. On Linux and macOS, you can extract the contents of the .tar.xz archive using the tar xvf command.

    Configuration

    Once CodeReady Containers has been installed, set up your host environment with the crc setup command. This command must be run before starting the OpenShift cluster. This command should be run with your regular user account but will request elevated privileges when modifications are needed. Ensure that your user account is capable of elevating privileges.

    $ crc setup
    

    Start your OpenShift 4 cluster

    After your host environment has been set up with the crc setup command, you can start the OpenShift cluster with the crc start command. When prompted, supply your user pull secret for the cluster. Your user pull secret can be copied or downloaded from the the Red Hat CodeReady Containers product page under the Pull Secret section. A Red Hat account is required to access the user pull secret.

    $ crc start
    

    That's it!

    You should now have a running Red Hat OpenShift 4 cluster in no time.

    Using your cluster

    CodeReady Containers includes a cached OpenShift client binary (oc). You can use this cached oc binary to interact with the running OpenShift cluster by running the crc oc-env command and following the printed instructions. Once the environment has been set up to use the cached oc binary, you can log in to the cluster as the developer user, as follows:

    $ eval $(crc oc-env)
    $ oc login -u developer -p developer
    

    Now we’ll create a sample httpd application deployment. Once you are logged in with oc, create a new project:

    $ oc new-project myproject
    

    Create the httpd example application:

    $ oc new-app httpd-example
    

    Monitor the status of your build to ensure it pushes successfully:

    $ oc logs -f bc/httpd-example
    [...]
    Writing manifest to image destination
    Storing signatures
    Push successful
    

    Once the push is successful, get the route to your application and ensure it is functioning properly:

    $ oc get routes
    NAME            HOST/PORT                           PATH SERVICES PORT TERMINATION   WILDCARD
    httpd-example   httpd-example-myproject.apps-crc.testing          httpd-example <all> None
    $ curl -Ik httpd-example-myproject.apps-crc.testing
    HTTP/1.1 200 OK
    [...]
    

    Congratulations, you now have a sample httpd application running on Red Hat OpenShift 4!

    You can also use odo, a developer-focused command-line interface for OpenShift, to interact with the OpenShift cluster provided by CodeReady Containers.

    For more information about CodeReady Containers, see the official CodeReady Containers documentation. Also, see the video below for a hands-on look.

    Getting help

    If you encounter any issues using CodeReady Containers, see the Troubleshooting Red Hat CodeReady Containers guide. If this does not resolve your issue, create a bug in Bugzilla with the ‘crc’ component.

    For community discussion, join the #codeready IRC channel on Freenode.

    Acknowledgements

    Many thanks to the CodeReady Container development team, members of the Red Hat OpenShift development team and blog writers/reviewers Kevin Owen, Gerard Braad, Praveen Kumar, and all.

    Last updated: November 8, 2023

    Related Posts

    • Create and manage local persistent volumes with CodeReady Containers

    • Developer tools rebrand, say farewell to CodeReady name

    • Create a PrivateLink Red Hat OpenShift cluster on AWS with STS

    • How to run Red Hat CodeReady Containers on Windows 10 Enterprise

    • CodeReady Workspaces scales up, is now Red Hat OpenShift Dev Spaces

    Recent Posts

    • Build container images in CI/CD with Tekton and Buildpacks

    • How to deploy OpenShift AI & Service Mesh 3 on one cluster

    • JVM tuning for Red Hat Data Grid on Red Hat OpenShift 4

    • Exploring Llama Stack with Python: Tool calling and agents

    • Enhance data security in OpenShift Data Foundation

    What’s up next?

    Learn how to deploy an application on a cluster using Red Hat OpenShift Service on AWS. This learning path uses a pre-built application to allow you to become more familiar with OpenShift and Kubernetes features.

    Start learning
    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
    © 2025 Red Hat

    Red Hat legal and privacy links

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

    Report a website issue