-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.ci
More file actions
44 lines (32 loc) · 1.16 KB
/
Copy pathDockerfile.ci
File metadata and controls
44 lines (32 loc) · 1.16 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
# LabWired - Firmware Simulation Platform
# Copyright (C) 2026 Andrii Shylenko
#
# This software is released under the MIT License.
# See the LICENSE file in the project root for full license information.
# Multi-stage Dockerfile for the versioned CI runner image. The image contains
# only the labwired CLI, so `docker run ... image test --script ...` uses the
# same command line as a native release archive.
# Stage 1: Builder
FROM rust:1.95-slim-bookworm AS builder
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
COPY . .
RUN cargo build --release -p labwired-cli --locked
# Stage 2: Runtime
FROM debian:bookworm-slim
ARG VERSION
ARG REVISION
LABEL org.opencontainers.image.source="https://github.com/w1ne/labwired-core" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.revision="${REVISION}"
RUN apt-get update && apt-get install -y \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /build/target/release/labwired /usr/local/bin/labwired
WORKDIR /workspace
RUN labwired --version
ENTRYPOINT ["labwired"]
CMD ["--help"]