diff --git a/Dockerfile b/Dockerfile index 354e8eb..e713918 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ RUN set -eux; \ apt-get upgrade -y && \ apt-get install --no-install-recommends -y \ bash bash-completion ca-certificates curl dbus default-jre doas dos2unix dumb-init file \ - fuse3 gh git gnupg golang iproute2 iptables jq lsb-release lsof make nano net-tools nodejs npm \ + fuse3 fuse-overlayfs gh git gnupg golang iproute2 iptables jq lsb-release lsof make nano net-tools nodejs npm \ openssh-client passwd patch pipx python3 python3-pip python3-venv shellcheck siege \ sudo tar tree uidmap unzip virtualenv wget xz-utils; \ \ diff --git a/README.es.md b/README.es.md index ceb7ba8..31a593d 100644 --- a/README.es.md +++ b/README.es.md @@ -5,7 +5,7 @@ Un contenedor de desarrollo impulsado por [code-server](https://github.com/coder ## Caracter铆sticas - 馃捇 code-server (VS Code en el navegador) -- 馃惓 Docker-in-Docker (DinD) +- 馃惓 Docker-in-Docker (DinD) con storage driver fuse-overlayfs - 馃攼 Autenticaci贸n por contrase帽a o hash - 馃懁 Configuraci贸n din谩mica de usuario (UID, GID, contrase帽a) - 鈿欙笍 Herramientas preinstaladas: Docker, AWS CLI v2, kubectl, eksctl, Node.js, Python, Java, pre-commit, y m谩s. @@ -60,7 +60,7 @@ Inicia sesi贸n con las credenciales de tu archivo `.env`. ## Herramientas Incluidas -- Docker CLI +- Docker CLI (con storage driver fuse-overlayfs para contenedores sin privilegios) - AWS CLI v2 - kubectl (`v1.33.0`) - eksctl @@ -70,6 +70,10 @@ Inicia sesi贸n con las credenciales de tu archivo `.env`. - pre-commit - siege, jq, git, y m谩s. +## Storage Driver de Docker + +Este contenedor usa `fuse-overlayfs` como storage driver de Docker, lo que permite que Docker-in-Docker funcione eficientemente en contenedores sin privilegios sin requerir el driver `overlay2`. La configuraci贸n se establece autom谩ticamente en `/etc/docker/daemon.json` durante el inicio del contenedor. + ## Limpieza ```bash diff --git a/README.md b/README.md index 84fb7de..e902bae 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A developer container powered by [code-server](https://github.com/coder/code-ser ## Features - 馃捇 code-server (VS Code in the browser) -- 馃惓 Docker-in-Docker (DinD) +- 馃惓 Docker-in-Docker (DinD) with fuse-overlayfs storage driver - 馃攼 Password or hashed password auth via `.env` - 馃懁 Dynamic user configuration (UID, GID, password) - 鈿欙笍 Preinstalled: Docker, AWS CLI v2, kubectl, eksctl, Node.js, Python, Java, pre-commit, etc. @@ -60,7 +60,7 @@ Login using the credentials defined in `.env`. ## Tooling Included -- Docker CLI +- Docker CLI (with fuse-overlayfs storage driver for unprivileged containers) - AWS CLI v2 - kubectl (`v1.33.0`) - eksctl @@ -70,6 +70,10 @@ Login using the credentials defined in `.env`. - pre-commit - siege, jq, git, etc. +## Docker Storage Driver + +This container uses `fuse-overlayfs` as the Docker storage driver, which allows Docker-in-Docker to work efficiently in unprivileged containers without requiring the `overlay2` driver. The configuration is automatically set in `/etc/docker/daemon.json` during container startup. + ## Clean Up ```bash diff --git a/entrypoint.sh b/entrypoint.sh index 123216d..59cb107 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -91,6 +91,14 @@ mkdir -p "$HOME_DIR/.local/pipx/logs" chown -R "$DOCKER_USER:$DOCKER_USER" "$HOME_DIR/.local" chown -R "$DOCKER_USER:$DOCKER_USER" "$CONFIG_DIR" +echo "[entrypoint] Configuring Docker daemon..." +install -d -m755 /etc/docker +cat > /etc/docker/daemon.json < /dev/null 2>&1 &