sandbox-container
Reusable Docker template for development sandbox containers.
Usage
Build args
| Arg |
Default |
Description |
BASE_IMAGE |
node:25-slim |
Base Docker image (node, python, golang, etc.) |
Environment variables
| Variable |
Required |
Description |
GIT_USERNAME |
Yes |
Git username for authentication |
GIT_PASSWORD |
Yes |
Name of env variable containing the git password (indirect reference) |
GIT_REPO |
Yes |
Git repository URL to clone into /app |
Example
services:
sandbox:
build:
context: https://git.appproxy.link/opencroft/sandbox-container.git
args:
BASE_IMAGE: python:3.12-slim
environment:
- GIT_USERNAME=cleo
- GIT_PASSWORD=GIT_CLEO
- GIT_REPO=http://forgejo:3000/opencroft/my-project.git
volumes:
- /mnt/data/workspace/cleo/my-project:/app
How it works
- Builds from configurable base image
- Installs git and ca-certificates
- Sets up git credential helper that reads password from env via indirect expansion
- Entrypoint clones
GIT_REPO if /app is empty
- Falls through to CMD (
sleep infinity) for interactive development