-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (41 loc) · 1.42 KB
/
Dockerfile
File metadata and controls
49 lines (41 loc) · 1.42 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
40
41
42
43
44
45
46
47
48
49
# The build image
FROM docker.io/rust:1.93.1@sha256:ecbe59a8408895edd02d9ef422504b8501dd9fa1526de27a45b73406d734d659 AS weaver-build
WORKDIR /build
# Install Node.js and musl build dependencies
# renovate: datasource=node-version depName=node
ARG NODE_VERSION=24
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - && \
apt-get install -y nodejs musl-tools musl-dev perl
# Copy UI package files first for better layer caching
RUN npm install -g pnpm
COPY ui/package.json ui/pnpm-lock.yaml /build/ui/
RUN cd /build/ui && pnpm install --frozen-lockfile
# Copy UI source files
COPY ui /build/ui
# Copy Rust dependencies for better layer caching
COPY Cargo.toml Cargo.lock build.rs /build/
COPY .cargo /build/.cargo
# Copy source files
COPY crates /build/crates
COPY data /build/data
COPY src /build/src
COPY tests /build/tests
COPY defaults /build/defaults
COPY cross-arch-build.sh /build/cross-arch-build.sh
# Build the UI
RUN cd /build/ui && pnpm build
# Build weaver
RUN ./cross-arch-build.sh
# The runtime image
FROM docker.io/alpine:3.23.3@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659
LABEL maintainer="The OpenTelemetry Authors"
RUN addgroup weaver \
&& adduser \
--ingroup weaver \
--disabled-password \
weaver
WORKDIR /home/weaver
COPY --from=weaver-build --chown=weaver:weaver /build/weaver /weaver/weaver
USER weaver
RUN mkdir /home/weaver/target
ENTRYPOINT ["/weaver/weaver"]