-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (24 loc) · 814 Bytes
/
Copy pathDockerfile
File metadata and controls
34 lines (24 loc) · 814 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
FROM golang:1.25-bookworm AS builder
# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends gcc libc6-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ENV CGO_ENABLED=1
RUN make build
FROM debian:bookworm-slim
# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates git openssh-client \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /src/bin/octa-agentd /usr/local/bin/octa-agentd
COPY --from=builder /src/bin/octa-agent /usr/local/bin/octa-agent
RUN useradd -m -u 1000 octa
USER octa
WORKDIR /home/octa
ENV HOME=/home/octa
VOLUME ["/home/octa/.config/octaai"]
# Daemon health (optional): map host port to container 8766
EXPOSE 8766
ENTRYPOINT ["octa-agentd"]