Builds and dependencies
On this page
Container images
A trunkjet server stores Docker and OCI images next to the code they are built from. There is no second registry to run and no extra host name: an image lives at
<server>/<owner>/<repository>[/<name>]:<tag>
for example trunkjet.io/acme/shop:1.4 or trunkjet.io/acme/shop/api:latest. Anything after
the repository is an image name of your choice inside it. Who may pull and push follows the
repository's permissions.
Sign in
Docker and Podman sign in with a trunkjet token as the password (for example one made with
tjet agent token create), then:
docker login trunkjet.io
Username: you
Password: <the token>
The user name is not checked; the token decides who you are. In CI, use a token of the CI
service account and --password-stdin, so the token never appears on a command line:
printf '%s' "$TJET_TOKEN" | docker login trunkjet.io -u ci --password-stdin
Podman, containerd (nerdctl), crane, skopeo and oras sign in the same way.
Push and pull
docker build -t trunkjet.io/acme/shop:1.4 .
docker push trunkjet.io/acme/shop:1.4
docker pull trunkjet.io/acme/shop:1.4
Multi-platform images work as usual: docker buildx build --platform linux/amd64,linux/arm64 --push, or docker manifest create and docker manifest push. The server keeps the image
index and every platform's image; docker pull picks the one for your machine.
The repository's Packages page in the web app lists its images with their tags, platforms, sizes and digests, and copies the exact pull command.
Who may do what
| You have | You can |
|---|---|
| read access to the whole repository | pull |
| write access (developer) | push, overwrite tags |
| the maintainer role | delete tags and images |
| nothing (signed out) | pull images of a public repository of a public organisation |
Pulling needs read access to the whole repository, because an image can contain any of its files. If some paths of the repository are hidden from you, you cannot pull its images. A repository you cannot read answers like one that does not exist.
Images stay inside their repository. Pushing a layer that another repository already has
stores it again (a content hash never grants access to someone else's data). Within one
organisation, docker push asks the server to copy a layer from another repository you can
read instead of uploading it again; the server does that for layers up to 1 GiB.
Large layers behind Cloudflare
If your server sits behind Cloudflare (trunkjet.io does), Cloudflare refuses request bodies
over 100 MB. docker push sends each layer in one request, so a layer over 100 MB fails there
with a 413 error. Pulls are not affected.
You have three options:
- Push with a client that uploads each layer in chunks of at most 90 MB (the chunked upload of the OCI distribution spec). The server accepts any chunk size.
- Push to the server's direct host (
tjet.ioon trunkjet.io, the host the build cache uses), which does not go through Cloudflare. Pull from either host; the images are the same. - Push from a machine inside the server's network.
How long images are kept
- A tagged image stays until someone deletes the tag.
- An image without a tag that no multi-platform index names is deleted after 7 days. Re-pushing a tag moves it; the image it pointed to becomes untagged.
- A signature, SBOM or other artifact attached to an image (OCI referrers) stays as long as the image it belongs to.
- Uploaded layers that no image uses are deleted after 24 hours.
- Deletes and tag moves are recorded in the repository's audit log.
- A manifest that a multi-platform index names can only be deleted after the index.
For operators
The registry is off unless enabled: tjetd --registry, TJET_REGISTRY=1, or in the
configuration file:
[registry]
enabled = true
# max_blob_bytes = 17179869184 # largest layer, default 16 GiB
# untagged_retention_days = 7
# unreferenced_blob_hours = 24
It is served on the API listener at /v2/, next to the API (/v1/), the manual and the web
app, and needs no extra DNS name or certificate. Tokens it hands out (/v2/token) are sealed
with the installation's cursor key (security.cursor_key_file), which every server instance
must share. Image layers are stored in the same content store as repository files, in their own
storage domain per repository; they are fsynced like source content.
To let Cloudflare cache public layers, add a cache rule for /v2/*/blobs/sha256:* that
respects the origin's Cache-Control. Layers of public repositories are answered with
public, max-age=3600, immutable; private ones with private, no-store. A cached public
layer stays in the cache for up to an hour after the repository is made private.
A repository that holds only images (for example the installation's own server image) can be
created from the console, without an organisation member's session:
tjet-admin repo create <org>/<name> --public. The command is audited in the organisation and
never changes the organisation's own visibility: signed-out pulls also need a public
organisation. Push with a service principal of that repository
(tjet-admin service create <name> --org <org> --repo <org>/<name> --role developer).
Metrics: tjet_registry_requests_total{route,status}, tjet_registry_events_total{op,result}
(uploads, deduplicated blobs, mounts, refusals), tjet_registry_bytes_total{direction}.
What is not there yet
- No catalog (
/v2/_catalog): it would list names across repositories. Use the Packages page. - Manifests are limited to 256 KiB (Docker allows 4 MiB; real images rarely exceed a few KB).
- Stored layers do not count against organisation quotas yet.
- Release files, npm, Maven and PyPI packages are planned on the same storage (plan).