feat: add fuse-overlayfs storage driver for Docker-in-Docker
Some checks failed
release / release-default (push) Failing after 16s
Some checks failed
release / release-default (push) Failing after 16s
- Install fuse-overlayfs package in Dockerfile - Configure Docker daemon to use fuse-overlayfs storage driver - Add daemon.json configuration in entrypoint.sh - Update documentation in README.md and README.es.md This enables Docker-in-Docker to work efficiently in unprivileged containers without requiring the overlay2 driver.
This commit is contained in:
@@ -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; \
|
||||
\
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 <<DOCKEREOF
|
||||
{
|
||||
"storage-driver": "fuse-overlayfs"
|
||||
}
|
||||
DOCKEREOF
|
||||
|
||||
echo "[entrypoint] Starting Docker daemon..."
|
||||
dockerd > /dev/null 2>&1 &
|
||||
|
||||
|
||||
Reference in New Issue
Block a user