-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.deb
More file actions
37 lines (27 loc) · 1.08 KB
/
Copy pathDockerfile.deb
File metadata and controls
37 lines (27 loc) · 1.08 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
# Dockerfile for building a Debian package (.deb) for rgrc
# Usage (from repo root):
# docker build -t rgrc-deb-builder -f Dockerfile.deb .
# docker run --rm -v "$(pwd):/work" rgrc-deb-builder cargo deb --no-default-features
FROM rust:slim-bullseye
ENV DEBIAN_FRONTEND=noninteractive
# Replace mirrors for speed in CN
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
# Install system dependencies required for compiling and for dpkg
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
curl \
ca-certificates \
git \
libssl-dev \
dpkg-dev \
&& rm -rf /var/lib/apt/lists/*
# Install cargo-deb (so we can create .deb packages)
RUN cargo install --locked cargo-deb
WORKDIR /work
# Ensure we have the linux target available inside the container
# RUN rustup target add x86_64-unknown-linux-gnu
# ENTRYPOINT [ "/bin/sh" ]
# Default entrypoint does nothing — run container with volume to retrieve artifacts
CMD ["/bin/sh", "-c", "echo done; ls -la /work || true"]