forked from IguanAI/adic-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.fromhost
More file actions
39 lines (29 loc) · 922 Bytes
/
Dockerfile.fromhost
File metadata and controls
39 lines (29 loc) · 922 Bytes
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
# Dockerfile that uses the pre-built binary from host
FROM debian:bookworm-slim
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libssl3 \
curl \
&& rm -rf /var/lib/apt/lists/*
# Create non-root user
RUN useradd -m -u 1000 adic
# Copy the pre-built binary from host
# This expects the binary to be in the build context
COPY adic /usr/local/bin/adic
RUN chmod +x /usr/local/bin/adic
# Copy configuration
COPY bootstrap-config.toml /config/node.toml
# Create data directory
RUN mkdir -p /data && chown adic:adic /data /config
# Switch to non-root user
USER adic
WORKDIR /data
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8080/health || exit 1
# Expose ports
EXPOSE 8080 9000 9001/udp
# Start ADIC with config file
ENTRYPOINT ["adic", "--config", "/config/node.toml"]
CMD ["start"]