Docker images + GHCR
Production container images (multi-stage, non-root, healthchecked) for each deployable part of the project, plus a GitHub Actions workflow that builds and publishes them to GitHub Container Registry after CI passes.
Category: deploy
In your existing repository
Ask your agent to check compatibility, follow this fragment’s brief, and verify the resulting project. What happens next
- Applies to:
- python-react, python-api, typescript-api, astro-fullstack, go-api
- Requires tools:
- docker
Add to your project
Paste the prompt into the coding agent working on your project.
View prompt
Or use the terminal
npx @steamfield/stacks add docker-deploy| Step | Phase | Layer | Command |
|---|---|---|---|
| image-build | check | build | (test ! -f Makefile || make docker-build) && (test -f Makefile || bun run docker-build) |
Use with a new stack
Starting fresh instead? These stacks support this fragment.
- astro-fullstackoptional
npx @steamfield/stacks new astro-fullstack --with docker-deploy - python-apioptional
npx @steamfield/stacks new python-api --with docker-deploy - go-apioptional
npx @steamfield/stacks new go-api --with docker-deploy - python-reactoptional
npx @steamfield/stacks new python-react --with docker-deploy - typescript-apioptional
npx @steamfield/stacks new typescript-api --with docker-deploy
Files
This fragment supplies instructions rather than project files.
Usage
Among stacks projects in the 28 days through 30 Oct 2026: 3,145 projects; 83% reached a green verify (80–85%, n=910).
Weekly projects by stack
Projects whose final fragment set included this fragment, grouped by stack.
- go-api
- python-api
- python-react
- typescript-api
- go-api
- python-api
- python-react
- typescript-api
Stacks projects per UTC week through 30 Oct 2026. Published stack counts only.
Data table
| Week ending | Stack | Projects |
|---|---|---|
| 5 Jul 2026 | go-api | 30 |
| 12 Jul 2026 | go-api | 55 |
| 19 Jul 2026 | go-api | 85 |
| 26 Jul 2026 | go-api | 90 |
| 2 Aug 2026 | go-api | 110 |
| 9 Aug 2026 | go-api | 120 |
| 16 Aug 2026 | go-api | 120 |
| 23 Aug 2026 | go-api | 125 |
| 30 Aug 2026 | go-api | 145 |
| 6 Sept 2026 | go-api | 145 |
| 13 Sept 2026 | go-api | 160 |
| 20 Sept 2026 | go-api | 150 |
| 27 Sept 2026 | go-api | 175 |
| 4 Oct 2026 | go-api | 180 |
| 11 Oct 2026 | go-api | 170 |
| 18 Oct 2026 | go-api | 170 |
| 25 Oct 2026 | go-api | 170 |
| 5 Jul 2026 | python-api | – |
| 12 Jul 2026 | python-api | – |
| 19 Jul 2026 | python-api | – |
| 26 Jul 2026 | python-api | – |
| 2 Aug 2026 | python-api | – |
| 9 Aug 2026 | python-api | – |
| 16 Aug 2026 | python-api | – |
| 23 Aug 2026 | python-api | – |
| 30 Aug 2026 | python-api | – |
| 6 Sept 2026 | python-api | – |
| 13 Sept 2026 | python-api | – |
| 20 Sept 2026 | python-api | – |
| 27 Sept 2026 | python-api | – |
| 4 Oct 2026 | python-api | – |
| 11 Oct 2026 | python-api | – |
| 18 Oct 2026 | python-api | – |
| 25 Oct 2026 | python-api | – |
| 5 Jul 2026 | python-react | 70 |
| 12 Jul 2026 | python-react | 120 |
| 19 Jul 2026 | python-react | 155 |
| 26 Jul 2026 | python-react | 195 |
| 2 Aug 2026 | python-react | 190 |
| 9 Aug 2026 | python-react | 235 |
| 16 Aug 2026 | python-react | 220 |
| 23 Aug 2026 | python-react | 245 |
| 30 Aug 2026 | python-react | 280 |
| 6 Sept 2026 | python-react | 275 |
| 13 Sept 2026 | python-react | 300 |
| 20 Sept 2026 | python-react | 280 |
| 27 Sept 2026 | python-react | 330 |
| 4 Oct 2026 | python-react | 345 |
| 11 Oct 2026 | python-react | 270 |
| 18 Oct 2026 | python-react | 235 |
| 25 Oct 2026 | python-react | 175 |
| 5 Jul 2026 | typescript-api | 75 |
| 12 Jul 2026 | typescript-api | 150 |
| 19 Jul 2026 | typescript-api | 195 |
| 26 Jul 2026 | typescript-api | 245 |
| 2 Aug 2026 | typescript-api | 235 |
| 9 Aug 2026 | typescript-api | 270 |
| 16 Aug 2026 | typescript-api | 310 |
| 23 Aug 2026 | typescript-api | 330 |
| 30 Aug 2026 | typescript-api | 305 |
| 6 Sept 2026 | typescript-api | 355 |
| 13 Sept 2026 | typescript-api | 415 |
| 20 Sept 2026 | typescript-api | 395 |
| 27 Sept 2026 | typescript-api | 425 |
| 4 Oct 2026 | typescript-api | 390 |
| 11 Oct 2026 | typescript-api | 480 |
| 18 Oct 2026 | typescript-api | 445 |
| 25 Oct 2026 | typescript-api | 485 |
By stack
How often this fragment stays in a default composition, or gets attached as an option.
Stacks projects · 28 days through 30 Oct 2026. Counts rounded to 5.
Data table
| Stack | Projects | Role | Share |
|---|---|---|---|
| go-api | 650 | Optional · attached | 17% |
| python-api | – | Optional · attached | – |
| python-react | 790 | Optional · attached | 18% |
| typescript-api | 1,695 | Optional · attached | 16% |
Green rate with and without it
This compares projects; it isn't an effect of the fragment.
With
78%74–82%, n=400
Without
74%72–75%, n=2,075
With
87%84–89%, n=505
Without
86%85–87%, n=2,245
Stacks projects · 28 days through 30 Oct 2026. Counts rounded to 5.
Data table
| Stack | With | Without |
|---|---|---|
| go-api | 78% (74–82%, n=400) | 74% (72–75%, n=2,075) |
| python-react | 87% (84–89%, n=505) | 86% (85–87%, n=2,245) |
Often used with
Co-occurrence above the baseline, within a stack. Required fragment pairs are excluded.
Not enough runs in this breakdown yet.
Stacks projects · 28 days through 30 Oct 2026. Counts rounded to 5.
Computed 31 Oct 2026, through 30 Oct 2026. Numbers describe stacks projects, not the ecosystem.