Public Repository (Git)
Deploy from any public Git URL — clone, build, ship.
Point Pier at a public Git repository (GitHub, GitLab, Bitbucket, Codeberg, Gitea, anywhere) and Pier clones it, builds via the Dockerfile in the repo, and runs the resulting container. Webhook-friendly for push-to-deploy. The simplest "I have a repo, deploy it" template for open-source code.
Deploy with Pier
- 1 Open the Pier dashboard and click Add service.
- 2 Pick Public Repository from the template list.
- 3 Choose the version, set a service name, and Pier provisions the container, storage, and ports automatically.
- 4 Attach a domain if you want HTTPS. Traefik auto-provisions the Let's Encrypt certificate.
What is the Public Repository template?
Give Pier a public Git URL plus the Dockerfile path within the repo, and Pier clones the repository, builds the image, runs the container, and fronts it with Traefik. Standard webhook integration means each git push to the watched branch triggers a fresh build and redeploy.
Use it for any public repo with a Dockerfile — your own open-source projects, third-party projects you want to self-host, forks, documentation sites that build to a container, and so on.
How Pier deploys it
You provide:
- A public Git URL (HTTPS clone URL)
- A branch (or tag / commit SHA)
- The path to the Dockerfile within the repo (defaults to
/Dockerfile) - The container port and any env vars
Pier performs a shallow clone of the configured branch, runs docker buildx build against the Dockerfile, stores the image locally, and
starts a container with your configured env / ports / volumes. BuildKit
layer cache makes incremental rebuilds fast.
Attach a custom domain in Pier for HTTPS via Traefik. Generate a webhook URL from the service settings and add it to your Git host so future pushes auto-deploy.
When NOT to use this template
For private repos, use git-private-key (SSH deploy key) or
git-github-app (GitHub App auth). For repos without a Dockerfile, use
Railpack — it auto-detects and builds. For one-off inline Dockerfile
containers without a repo, use the Dockerfile template. For prebuilt
images already in a registry, use Docker Image.
Key features
Any public Git host
GitHub, GitLab, Bitbucket, Codeberg, sourcehut, self-hosted Gitea/Forgejo — anything with a publicly cloneable HTTPS URL works.
Dockerfile-driven build
Pier looks for the Dockerfile at the configured path (default repo root) and builds with BuildKit. Same engine as the Dockerfile template.
Branch + path selection
Pick the branch and (for monorepos) the path to the Dockerfile within the repo.
Webhook redeploys
Pier generates a webhook URL; add it as a webhook on the Git host and every push triggers rebuild + rollout.
HTTPS via Traefik
Attach a custom domain and Pier fronts the running container with Let's Encrypt TLS.
BuildKit cache
Repeat builds use BuildKit's layer cache; typical incremental rebuilds finish in 10-30 seconds.
Use cases
Open-source project deploys
Deploy any OSS project you find on GitHub with a Dockerfile. Pier handles the build + host.
Your own public repos
Public repo (e.g. your own portfolio site, a personal API) — Pier clones, builds, deploys.
Documentation sites
A repo with a Dockerfile-buildable docs site (Astro, Docusaurus, Hugo, mdBook). Pier builds and serves the result.
Quick-share demos
Share a Git URL with a colleague who wants to try the project — they paste it into Pier and have it running.
Fork-and-deploy workflows
Fork an upstream project, push tweaks to your fork, deploy your fork via Pier with webhook redeploys.
Code examples
Service name: my-app
Git URL: https://github.com/user/repo
Branch: main
Dockerfile path: /Dockerfile
Port: 3000
→ Pier clones, builds, deploys. Git URL: https://github.com/myorg/monorepo
Branch: main
Dockerfile path: /services/api/Dockerfile
Port: 8000 Pier Service → Settings → Copy webhook URL.
GitHub repo → Settings → Webhooks → Add:
URL: https://pier.example.com/webhook/abcd1234
Content type: application/json
Events: Just the push event
→ Every push to "main" triggers redeploy Branch: v1.4.0 # tags work in the branch field
→ Pier checks out the tag; no surprise updates. How it compares
| vs Dockerfile template (paste inline) | Use Public Repository for code you'll iterate on (webhook redeploys). Use Dockerfile (paste) for one-off containers without a repo. |
| vs Private repos (deploy-key / github-app templates) | Use those templates when the repo isn't publicly cloneable. Public Repository is the simplest path when you don't need auth. |
| vs Railpack | Railpack also takes a Git URL but skips the Dockerfile — it auto-detects the language. Use Public Repository when the repo has a Dockerfile you want Pier to use; use Railpack when you don't have one. |
| vs Docker Image (this catalog) | Image runs a prebuilt image. Public Repository builds from source. Different points in the pipeline. |
Frequently asked questions
What Git hosts work?
How do I deploy a specific commit / tag?
How big can the repo be?
Build args?
Runtime env vars?
Multiple services from one repo?
How does the webhook work?
Related services
Deploy on your VPS
Point Pier at a public Git repository (GitHub, GitLab, Bitbucket, Codeberg, Gitea, anywhere) and Pier clones it, builds via the Dockerfile in the repo, and runs the resulting container. Webhook-friendly for push-to-deploy. The simplest "I have a repo, deploy it" template for open-source code.
Deploy this service →