forked from grafana/beyla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (33 loc) · 954 Bytes
/
Dockerfile
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
40
41
42
43
44
45
46
47
# Build the autoinstrumenter binary
FROM golang:1.21 as builder
# TODO: embed software version in executable
ARG TARGETARCH
ENV GOARCH=$TARGETARCH
WORKDIR /opt/app-root
RUN apt-get update
RUN apt-get install -qy ca-certificates
# Copy the go manifests and source
COPY .git/ .git/
COPY bpf/ bpf/
COPY cmd/ cmd/
COPY pkg/ pkg/
COPY vendor/ vendor/
COPY go.mod go.mod
COPY go.sum go.sum
COPY Makefile Makefile
COPY LICENSE LICENSE
COPY NOTICE NOTICE
COPY third_party_licenses.csv third_party_licenses.csv
# Build
RUN make compile
# Create final image from minimal + built binary
FROM debian:bookworm-slim
LABEL maintainer="Grafana Labs <[email protected]>"
WORKDIR /
COPY --from=builder /opt/app-root/bin/beyla .
COPY --from=builder /opt/app-root/LICENSE .
COPY --from=builder /opt/app-root/NOTICE .
COPY --from=builder /opt/app-root/third_party_licenses.csv .
COPY --from=builder /etc/ssl/certs /etc/ssl/certs
USER 0:0
ENTRYPOINT [ "/beyla" ]