mirror of
https://github.com/moghtech/komodo.git
synced 2026-09-10 08:01:11 +00:00
* 2.4.0-dev-0 * deploy 2.4.0-dev-1 * slightly optimize stack read path * Add IMAGE_NAME and IMAGE_TAG default build args in addition to VERSION * deploy 2.4.0-dev-2 * ui use || location.origin for base url * move to build time versioning * simplify run action with komodo managed version * procedure batch executions use tag filters * set advanced code splitting options * improve network module logic / edge cases * fix startup ordering - apply legacy db fixes before other tasks * lengthen periphery command timeouts * update deps * clients still have explicit versions * Add page breadcrumbs * mogh ui 1.2.6 * fix set version – set only specific path * cargo fmt * use mogh ui ListPagination * bump deps, rust 1.98.0 * missing dockerfile rust 1.98.0 bump
76 lines
2.2 KiB
Docker
76 lines
2.2 KiB
Docker
## All in one, multi stage compile + runtime Docker build for your architecture.
|
|
|
|
# Build Core
|
|
FROM rust:1.98.0-trixie AS core-builder
|
|
RUN cargo install cargo-strip cargo-edit
|
|
|
|
WORKDIR /builder
|
|
COPY Cargo.toml Cargo.lock ./
|
|
COPY ./lib ./lib
|
|
COPY ./client/core/rs ./client/core/rs
|
|
COPY ./client/periphery ./client/periphery
|
|
COPY ./bin/core ./bin/core
|
|
COPY ./bin/cli ./bin/cli
|
|
COPY ./xtask ./xtask
|
|
|
|
# Set Version
|
|
ARG VERSION="0.0.0"
|
|
ARG IMAGE_TAG=""
|
|
RUN cargo set-version -p komodo_core ${VERSION}${IMAGE_TAG:+-${IMAGE_TAG}}
|
|
|
|
# Compile app
|
|
RUN cargo build -p komodo_core --release && \
|
|
cargo build -p komodo_cli --release && \
|
|
cargo strip
|
|
|
|
# Build UI
|
|
FROM node:22.12-alpine AS ui-builder
|
|
WORKDIR /builder
|
|
COPY ./ui ./ui
|
|
COPY ./client/core/ts ./client
|
|
RUN cd client && yarn && yarn build && yarn link
|
|
RUN cd ui && yarn link komodo_client && yarn && yarn build
|
|
|
|
# Final Image
|
|
FROM debian:trixie-slim
|
|
|
|
COPY ./bin/core/starship.toml /starship.toml
|
|
COPY ./bin/core/debian-deps.sh .
|
|
RUN sh ./debian-deps.sh && rm ./debian-deps.sh
|
|
|
|
# Setup an application directory
|
|
WORKDIR /app
|
|
|
|
# Copy
|
|
COPY ./config/core.config.toml /config/.default.config.toml
|
|
COPY --from=ui-builder /builder/ui/dist /app/ui
|
|
COPY --from=core-builder /builder/target/release/core /usr/local/bin/core
|
|
COPY --from=core-builder /builder/target/release/km /usr/local/bin/km
|
|
COPY --from=denoland/deno:bin /deno /usr/local/bin/deno
|
|
|
|
# Set $DENO_DIR and preload external Deno deps
|
|
ENV DENO_DIR=/action-cache/deno
|
|
RUN mkdir /action-cache && \
|
|
cd /action-cache && \
|
|
deno install jsr:@std/yaml jsr:@std/toml
|
|
|
|
COPY ./bin/entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
|
|
|
# Hint at the port
|
|
EXPOSE 9120
|
|
|
|
ENV KOMODO_CLI_CONFIG_PATHS="/config"
|
|
# This ensures any `komodo.cli.*` takes precedence over the Core `/config/*config.*`
|
|
ENV KOMODO_CLI_CONFIG_KEYWORDS="*config.*,*komodo.cli*.*"
|
|
|
|
ENTRYPOINT [ "entrypoint.sh" ]
|
|
CMD [ "core" ]
|
|
|
|
# Label to prevent Komodo from stopping with StopAllContainers
|
|
LABEL komodo.skip="true"
|
|
# Label for Ghcr
|
|
LABEL org.opencontainers.image.source="https://github.com/moghtech/komodo"
|
|
LABEL org.opencontainers.image.description="Komodo Core"
|
|
LABEL org.opencontainers.image.licenses="GPL-3.0"
|