-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
# =========== 1) BUILD STAGE ============= | ||
FROM ubuntu:24.04 AS builder | ||
|
||
# Install dependencies needed to build trueblocks-khedra | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
cmake \ | ||
git | ||
|
||
# Create and change to the source directory | ||
WORKDIR /app | ||
|
||
# Copy source into the container | ||
COPY . /app | ||
|
||
# Build the project | ||
RUN mkdir build && cd build && cmake .. && make | ||
|
||
# =========== 2) FINAL STAGE ============= | ||
FROM ubuntu:22.04 | ||
|
||
# Copy compiled binary from the builder stage | ||
COPY --from=builder /app/build/khedra /usr/local/bin/khedra | ||
|
||
# Copy example config (you can move or rename as preferred) | ||
COPY --from=builder /app/config.example /root/.trueblocks/trueblocks-khedra.conf | ||
|
||
# Set environment variables or defaults for Khedra | ||
ENV KHEDRA_CONFIG=/root/.trueblocks/trueblocks-khedra.conf \ | ||
KHEDRA_DATA_DIR=/root/.trueblocks/data \ | ||
KHEDRA_LOG_LEVEL=INFO | ||
|
||
# Default entrypoint runs 'khedra' | ||
ENTRYPOINT ["khedra"] | ||
# Default command shows help text | ||
CMD ["--help"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters