The image now packages a cross-compiled musl binary on distroless instead of compiling inside Docker. The script builds it, pushes :<version> and :latest to git.cosocial.info, and tags the commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 lines
522 B
Docker
13 lines
522 B
Docker
# Release image: packages the static binary built by scripts/release.sh.
|
|
# No compiler runs here, so the image builds in seconds on any machine.
|
|
FROM gcr.io/distroless/static-debian12:nonroot
|
|
COPY target/x86_64-unknown-linux-musl/release/cities-labeler /usr/local/bin/cities-labeler
|
|
COPY data /app/data
|
|
ENV CITIES_PATH=/app/data/cities.json \
|
|
DB_PATH=/data/labeler.sqlite \
|
|
PORT=4100
|
|
# matches the owner of the ansible-managed data directory
|
|
USER 1000:1000
|
|
EXPOSE 4100
|
|
ENTRYPOINT ["/usr/local/bin/cities-labeler"]
|