Sandbox container
  • Dockerfile 62.6%
  • Shell 37.4%
Find a file
cleo d83113a71f Начальная версия шаблона sandbox-контейнера
- Dockerfile с настраиваемым BASE_IMAGE (ARG)
- entrypoint.sh: автоклонирование GIT_REPO если /app пуст
- git-cred.sh: credential helper с indirect expansion из env
- README с примером использования
2026-05-16 23:28:52 +00:00
Dockerfile Начальная версия шаблона sandbox-контейнера 2026-05-16 23:28:52 +00:00
entrypoint.sh Начальная версия шаблона sandbox-контейнера 2026-05-16 23:28:52 +00:00
git-cred.sh Начальная версия шаблона sandbox-контейнера 2026-05-16 23:28:52 +00:00
README.md Начальная версия шаблона sandbox-контейнера 2026-05-16 23:28:52 +00:00

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

  1. Builds from configurable base image
  2. Installs git and ca-certificates
  3. Sets up git credential helper that reads password from env via indirect expansion
  4. Entrypoint clones GIT_REPO if /app is empty
  5. Falls through to CMD (sleep infinity) for interactive development