memory-bank/components/docker-up.md
The Docker-Up component in Gitpod is responsible for setting up and managing Docker within workspace containers. It provides a way to run Docker in a rootless mode inside Gitpod workspaces, enabling users to build and run containers without requiring privileged access. The component handles the installation, configuration, and startup of Docker daemon and related tools, ensuring they work correctly within the constraints of a workspace environment.
The primary purposes of the Docker-Up component are:
The Docker-Up component consists of several key parts:
The component is designed to run as a service within a Gitpod workspace, automatically starting when Docker functionality is requested and configuring the environment appropriately.
The Docker-Up component can be configured through command-line flags and environment variables:
--verbose, -v: Enables verbose logging--runc-facade: Enables the runc-facade to handle rootless idiosyncrasies--bin-dir: Directory where runc-facade is found--auto-install: Auto-install prerequisites (Docker)--user-accessible-socket: Make the Docker socket user accessible--dont-wrap-netns: Control network namespace wrapping--auto-login: Use content of GITPOD_IMAGE_AUTH to automatically login with the Docker daemonDOCKERD_ARGS: JSON-formatted custom arguments for the Docker daemonLISTEN_FDS: Used for socket activationWORKSPACEKIT_WRAP_NETNS: Controls network namespace wrappingGITPOD_IMAGE_AUTH: Docker registry authentication informationThe Docker-Up component integrates with:
docker-up
DOCKERD_ARGS='{"remap-user":"1000"}' docker-up
docker-compose up -d
components/common-go: Common Go utilitiesThe component implements several security measures:
The runc-facade is a wrapper around the standard runc container runtime that:
The component supports custom Docker daemon arguments through the DOCKERD_ARGS environment variable, which accepts a JSON object with configuration options:
remap-user: Configure user namespace remappingproxies: HTTP/HTTPS proxy settingshttp-proxy: HTTP proxy configurationhttps-proxy: HTTPS proxy configuration