Use Kubedock in a workspace

Use Kubedock to run containers in your workspace when Docker-in-Docker or privileged containers are not available.

Before you begin

  • You have a running OpenShift Dev Spaces workspace.
  • You have the Kubedock command-line interface (CLI) (kubedock) available in your workspace. It is included in the Universal Developer Image (UDI).

Procedure

  1. Set the DOCKER_HOST environment variable to point to the Kubedock server:
    export DOCKER_HOST=tcp://127.0.0.1:2475
  2. Start the Kubedock server in the background:
    kubedock server --port-forward &
  3. Use standard Docker commands that Kubedock handles:
    docker run --rm hello-world

Results

  • The container runs successfully and outputs its message.