-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (29 loc) · 1.03 KB
/
Copy pathDockerfile
File metadata and controls
39 lines (29 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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"]