-
Notifications
You must be signed in to change notification settings - Fork 43
/
Dockerfile.debian
52 lines (40 loc) · 1.2 KB
/
Dockerfile.debian
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
50
51
52
FROM debian:latest
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
clang \
curl \
debhelper \
libdbus-1-dev \
libssl-dev \
libsystemd-dev \
libudev-dev \
systemd \
unzip
RUN set -eux; \
url="https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init"; \
curl -sSf -o rustup-init "$url"; \
sha256sum rustup-init; \
chmod +x rustup-init; \
./rustup-init -y --no-modify-path --default-toolchain stable; \
rm rustup-init; \
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
rustup --version; \
cargo --version; \
rustc --version;
RUN cargo install cargo-deb
COPY . /app
WORKDIR /app
RUN cargo test --release
RUN mkdir -p dist/
RUN cargo deb --package softu2f-system-daemon
RUN mv target/debian/*.deb dist/
RUN cargo deb --package softu2f-user-daemon
RUN mv target/debian/*.deb dist/
RUN cd linux/meta-package && dpkg-buildpackage -us -uc
RUN mv linux/*.deb dist/
RUN cd linux/u2f-hidraw-policy && dpkg-buildpackage -b
RUN mv linux/*.deb dist/
CMD ["/bin/bash"]