Skip to content

gitpod-samples/docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Using Docker in Gitpod Flex Dev Environments

Overview

Gitpod Flex dev environments support Docker in two primary ways:

  1. Using the pre-installed Docker engine inside the host virtual machine (VM).
  2. Running Docker-in-Docker (DinD) inside the dev container.

Context

Every Gitpod Flex development environment runs inside a dedicated virtual machine. Inside this VM, Gitpod Flex launches a Docker engine, which in turn runs your dev container.

When you connect to your environment using an IDE, the terminal and file system you access are inside this dev container. This container is fully customizable and rebuildable to suit your development needs.

However, the outer VM and the host Docker engine are not intended to be modified by the user.

graph TD
    subgraph Host VM [Gitpod Flex Virtual Machine]
        DE[Docker Engine]
        subgraph DC[Dev Container]
            FS[File System]
            Term[Terminal Access]
        end
    end
Loading

Using Docker-in-Docker (DinD)

To run Docker inside your dev container independently of the host Docker engine, you can set up Docker-in-Docker.

This approach involves running a separate Docker daemon inside your dev container. Refer to official DinD src for an example for configuration and security considerations.


Docker Outside Docker (DoD)

An alternative to DinD is to use the host's Docker engine from within the dev container — a setup known as Docker Outside Docker (DoD). This is done by mounting the Docker socket from the host into the container.

Methods

1. Use the docker-outside-of-docker DevContainer Feature

This is the recommended and most convenient method. See the official repository for an example

2. Manual Setup

If you prefer not to use the DevContainer feature, you can configure DoD manually:


About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published