Supported Languages and Frameworks
When you deploy a GitHub repository that does not include a Dockerfile, Clank inspects the repo contents and generates an optimized Dockerfile automatically. This page covers every language and framework the auto-detection system supports, what triggers each detection, and what the generated build looks like.
Summary
Section titled “Summary”| Language | Detected by | Base image | Default port | Frameworks |
|---|---|---|---|---|
| Node.js (SPA) | package.json + build script | node:20-alpine build, nginx:alpine runtime | 80 | Vite, Create React App, Vue CLI, Next.js (static export) |
| Node.js (server) | package.json + start script | node:20-alpine | 8080 | Express, Fastify, Koa, Hapi, NestJS, Next.js (SSR), Nuxt |
| Python | requirements.txt or pyproject.toml | python:3.12-slim | 8080 | FastAPI, Flask, Django, Starlette |
| Go | go.mod | golang:1.22-alpine build, alpine:3.19 runtime | 8080 | Gin, Echo, Fiber, Gorilla |
| Rust | Cargo.toml | rust:1.77-slim build, debian:bookworm-slim runtime | 8080 | Actix Web, Axum, Rocket, Warp |
| Ruby | Gemfile | ruby:3.3-slim | 8080 | Rails, Sinatra |
| Static HTML | index.html (no build tools) | nginx:alpine | 80 | None |
Node.js SPA
Section titled “Node.js SPA”Trigger: A package.json with a build script and a recognized frontend dependency (Vite, react-scripts, @vue/cli-service, or Next.js with output: 'export').
Generated Dockerfile: Multi-stage build. The first stage installs dependencies and runs the build command. The second stage copies the build output into an nginx:alpine image that serves static files on port 80. The output directory is framework-aware: dist for Vite and Vue CLI, build for Create React App, out for Next.js static export.
Package managers: Clank detects npm, pnpm, yarn, and bun from their respective lock files (package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lockb) and uses the correct install command for each.
Node.js server
Section titled “Node.js server”Trigger: A package.json with a start script and no SPA framework detected, or a recognized SSR framework (Next.js without static export, Nuxt).
Generated Dockerfile: If the project has a build script, Clank produces a multi-stage build that compiles first, then copies the output into a clean runtime image with production-only dependencies. If there is no build step, a single-stage image installs production dependencies and runs the start command directly. The default port is 8080 unless the start script specifies a different port.
Frameworks detected: Express, Fastify, Koa, Hapi, NestJS, Next.js (SSR), and Nuxt. Framework detection helps Clank set accurate confidence levels and default environment variables (for example, NODE_ENV=production).
Python
Section titled “Python”Trigger: A requirements.txt or pyproject.toml file in the repo root.
Generated Dockerfile: Uses python:3.12-slim. If requirements.txt is present, dependencies are installed with pip install -r requirements.txt. If only pyproject.toml is present, pip install . is used instead. The start command depends on the detected framework:
- FastAPI / Starlette —
uvicorn main:app --host 0.0.0.0 --port 8080 - Flask —
gunicorn app:app --bind 0.0.0.0:8080 - Django —
gunicorn config.wsgi:application --bind 0.0.0.0:8080(the WSGI module path is auto-detected frommanage.pyandwsgi.py)
Clank scans common entrypoints (main.py, app.py, app/main.py) for framework initialization patterns to determine the module and application object.
Trigger: A go.mod file in the repo root.
Generated Dockerfile: Multi-stage build. The first stage uses golang:1.22-alpine, downloads dependencies with go mod download, and compiles with CGO_ENABLED=0 for a fully static binary. The second stage copies the binary into alpine:3.19 (with CA certificates) and exposes port 8080.
Frameworks detected: Gin, Echo, Fiber, and Gorilla Mux (detected from go.mod dependency declarations).
Trigger: A Cargo.toml file in the repo root.
Generated Dockerfile: Multi-stage build. The first stage uses rust:1.77-slim, pre-builds dependencies using a dummy main.rs for layer caching, then copies the full source and runs cargo build --release. The second stage copies the release binary into debian:bookworm-slim with CA certificates. The binary name is extracted from the name field in Cargo.toml.
Frameworks detected: Actix Web, Axum, Rocket, and Warp (detected from Cargo.toml dependencies).
Trigger: A Gemfile in the repo root.
Generated Dockerfile: Uses ruby:3.3-slim with build-essential for compiling native extensions. Dependencies are installed with bundle install --without development test. The start command depends on the framework:
- Rails —
bundle exec rails server -b 0.0.0.0 -p 8080 - Sinatra / Rack apps —
bundle exec rackup -o 0.0.0.0 -p 8080(detected fromconfig.ru) - Standalone Ruby —
ruby app.rb(looks forapp.rb,main.rb, orserver.rb)
Static HTML
Section titled “Static HTML”Trigger: An index.html file in the repo root or a known content subdirectory (public, dist, www, site, static, html, web) with no recognized build tool present. A repo with at least two .html files is also detected at medium confidence.
Generated Dockerfile: Copies the content into nginx:alpine with a generated nginx.conf that supports SPA-style routing (try_files $uri /index.html) and long-lived asset caching. Port 80.
Using your own Dockerfile
Section titled “Using your own Dockerfile”If your repo already contains a Dockerfile (or Dockerfile.prod), Clank uses it as-is and skips auto-detection entirely. You can switch between auto-detected and custom Dockerfile in the service build settings. This is recommended for projects that need a non-standard build process, multiple services in one repo, or dependencies not covered by the generated Dockerfiles.