| 1 | # syntax=docker/dockerfile:1 |
| 2 | # Release-only image assembly. |
| 3 | # |
| 4 | # The public release workflow supplies the already-built, native Linux musl |
| 5 | # artifacts from release-artifacts.yml. Keeping compilation out of this image |
| 6 | # build makes the container use the same exact runtime bytes as the archives |
| 7 | # and avoids a second, emulated Rust build on the publication path. |
| 8 | |
| 9 | FROM debian:bookworm-slim |
| 10 | |
| 11 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 12 | ca-certificates \ |
| 13 | libdbus-1-3 \ |
| 14 | && rm -rf /var/lib/apt/lists/* |
| 15 | |
| 16 | RUN groupadd --gid 1000 codewhale \ |
| 17 | && useradd --create-home --shell /bin/bash --uid 1000 --gid 1000 codewhale \ |
| 18 | && install -d -m 0700 -o codewhale -g codewhale /home/codewhale/.codewhale \ |
| 19 | && install -d -m 0700 -o codewhale -g codewhale /home/codewhale/.deepseek |
| 20 | |
| 21 | COPY --chmod=0755 --chown=codewhale:codewhale bin/codewhale /usr/local/bin/codewhale |
| 22 | COPY --chmod=0755 --chown=codewhale:codewhale bin/codew /usr/local/bin/codew |
| 23 | |
| 24 | USER codewhale |
| 25 | WORKDIR /home/codewhale |
| 26 | ENTRYPOINT ["codewhale"] |
| 27 | CMD [] |
| 28 |