Skip to content

feat: Dockerfile (multi-stage build with baked-in model) #97

Closed

Description

@ajianaz

Summary

Create Dockerfile for uteke-serve with multi-stage build, pre-built binary from release, and embedding model baked in.

Acceptance Criteria

  • Multi-stage build (build deps in stage 1, runtime only in stage 2)
  • Downloads pre-built binary from GitHub release (not cargo build)
  • Embedding model baked into image (no runtime download)
  • ENV UTEKE_HOME=/data for configurable data directory
  • EXPOSE 8767 with CMD uteke-serve (uses defaults from feat: uteke-serve reads uteke.toml config, default host 0.0.0.0 #96)
  • .dockerignore excludes .git, target/, node_modules/, website/
  • Image works with both volume mount and bind mount
  • Total image size < 300MB

Design

Stage 1 (builder): debian:bookworm-slim
  - curl release binary (uteke + uteke-serve)
  - curl model files from HuggingFace (3 files ~188MB)

Stage 2 (runtime): debian:bookworm-slim
  - COPY --from=builder binaries to /usr/local/bin/
  - COPY --from=builder model to $UTEKE_HOME/models/
  - ENV UTEKE_HOME=/data
  - EXPOSE 8767
  - ENTRYPOINT ["uteke-serve"]

Usage

docker build -t uteke:v0.0.5 .

# Run with volume
docker run -d -p 8767:8767 -v uteke-data:/data uteke:v0.0.5

# Verify
curl http://localhost:8767/health
curl -X POST http://localhost:8767/remember -d '{"content":"hello","tags":["test"]}'
curl -X POST http://localhost:8767/recall -d '{"query":"hello"}'

Depends On

Verification

docker build -t uteke:test .                          # build succeeds
docker run --rm -p 8767:8767 uteke:test                # binds 0.0.0.0:8767
curl localhost:8767/health                             # {"status":"ok"}
docker run --rm uteke:test du -sh /data/models          # model exists

Activity

  1. added
    type:feature
    scope:docker
    on Jun 1, 2026
  2. added 9 commits that reference this issue on Jun 1, 2026
    645cfc9
    258e4e8
    d2fd13b
    8487c6d
    876ed42
    3e8b655
    bd21005
    33fe913
    8b3a137
  3. added 2 commits that reference this issue on Jun 1, 2026
    70ae658
    777bf12
  4. added 3 commits that reference this issue on Aug 13, 2026
    dd066ed
    52d05cd
    780af9a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope:dockertype:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions