-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.html
More file actions
157 lines (145 loc) · 6.14 KB
/
Copy pathexamples.html
File metadata and controls
157 lines (145 loc) · 6.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
---
layout: default
title: Example projects
description: Runnable companion projects for the tutorial sections — Quarkus, Python, Go, multi-container compose, ML inference, Node.
---
<section class="hero hero--compact">
<div class="container">
<span class="hero__eyebrow">Example projects</span>
<h1>Runnable companions to the tutorial.</h1>
<p class="hero__lead">
Every Containerfile in the tutorial body is mirrored here as a
complete, <code>podman build</code>-ready project. Read the matching
tutorial section for context, then build directly from the example
directory.
</p>
</div>
</section>
<section class="section">
<div class="container">
<h2 class="section-heading">Containerized examples</h2>
<p class="section-sub">
Six runnable projects covering the multi-stage build patterns
taught in §4 and the multi-container compose pattern from §7.
Each one is verified to build and run end-to-end against the
live Hummingbird image catalog as of May 2026.
</p>
<div class="cards">
<a class="card"
href="https://github.com/{{ site.github_username }}/hummingbird-tutorial/tree/main/examples/quarkus-example"
rel="noopener">
<div class="card__eyebrow">Java · <strong>Quarkus 3.33 LTS</strong></div>
<h3 class="card__title">Quarkus, JVM mode</h3>
<p class="card__desc">
Mixed-vendor multi-stage: UBI <code>openjdk-21</code> builder
(has Maven) compiles a Quarkus fast-jar; Hummingbird
<code>openjdk:21-runtime</code> (JRE-only) serves it. Single
REST endpoint, no native-image complexity.
</p>
<div class="card__meta">
<span>§4 Example A</span>
<span>Source ↗</span>
</div>
</a>
<a class="card"
href="https://github.com/{{ site.github_username }}/hummingbird-tutorial/tree/main/examples/python-example"
rel="noopener">
<div class="card__eyebrow">Python · <strong>FastAPI</strong></div>
<h3 class="card__title">Python wheel-build pattern</h3>
<p class="card__desc">
Compile wheels in <code>python:3.13-builder</code>, install from
wheels in <code>python:3.13</code>. The runtime image never sees a
compiler.
</p>
<div class="card__meta">
<span>§4 Example B · §11 Scenario 1</span>
<span>Source ↗</span>
</div>
</a>
<a class="card"
href="https://github.com/{{ site.github_username }}/hummingbird-tutorial/tree/main/examples/go-example"
rel="noopener">
<div class="card__eyebrow">Go · <strong>static binary</strong></div>
<h3 class="card__title">Go on Hummingbird Go runtime</h3>
<p class="card__desc">
The smallest of the bunch. <code>CGO_ENABLED=0</code> static
binary on the Hummingbird <code>go:1.26</code> runtime —
typically around 30 MB total.
</p>
<div class="card__meta">
<span>§4 Example C</span>
<span>Source ↗</span>
</div>
</a>
<a class="card"
href="https://github.com/{{ site.github_username }}/hummingbird-tutorial/tree/main/examples/node-example"
rel="noopener">
<div class="card__eyebrow">Node.js · <strong>stdlib + pino</strong></div>
<h3 class="card__title">Node.js HTTP service</h3>
<p class="card__desc">
Trivial HTTP server with structured logging via pino,
showing the npm install → COPY node_modules pattern across
<code>nodejs:20-builder</code> and <code>nodejs:20</code>.
</p>
<div class="card__meta">
<span>§4 Appendix</span>
<span>Source ↗</span>
</div>
</a>
<a class="card"
href="https://github.com/{{ site.github_username }}/hummingbird-tutorial/tree/main/examples/ml-example"
rel="noopener">
<div class="card__eyebrow">Python · <strong>NumPy</strong></div>
<h3 class="card__title">ML inference variant</h3>
<p class="card__desc">
Same wheel-build pattern as the Python example, but with a
NumPy dependency that compiles native code. Demonstrates the
shared-library COPY pattern (libstdc++, libgcc_s, libgomp)
for distroless runtimes — the technique scales to
<code>transformers</code> + <code>torch</code> when ready.
</p>
<div class="card__meta">
<span>§11 Scenario 2</span>
<span>Source ↗</span>
</div>
</a>
<a class="card"
href="https://github.com/{{ site.github_username }}/hummingbird-tutorial/tree/main/examples/compose-stack"
rel="noopener">
<div class="card__eyebrow">Compose · <strong>3 services</strong></div>
<h3 class="card__title">Multi-container stack</h3>
<p class="card__desc">
Web app, PostgreSQL, OpenTelemetry collector — all on
Hummingbird base images. Demonstrates the SELinux <code>:Z</code>
flag, healthcheck timing, and service-name DNS in one file.
</p>
<div class="card__meta">
<span>§7</span>
<span>Source ↗</span>
</div>
</a>
</div>
</div>
</section>
<section class="section">
<div class="container container-prose">
<h2 class="section-heading">Building any example</h2>
<p>
Every Containerfile in this directory accepts the same two build
args, so the same command builds them all:
</p>
<pre><code>podman build \
--build-arg HB_REGISTRY="${HB_REGISTRY:-quay.io/hummingbird}" \
--build-arg RH_REGISTRY="${RH_REGISTRY:-registry.access.redhat.com}" \
-t my-image:latest \
.</code></pre>
<h2 class="section-heading">If a build fails on <code>manifest unknown</code></h2>
<p>
Image names and the existence of specific Hummingbird builder
images vary across the early-access and post-GA windows. The
<a href="{{ '/plans/reconciliation-plan/' | relative_url }}">reconciliation plan, section A</a>
tracks every unverified image reference. If a build fails, that's
the first place to check.
</p>
</div>
</section>