Skip to content

Commit cb55612

Browse files
fix dockerfile for arm builds
1 parent 4683914 commit cb55612

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*.local
2+
.github
3+
.vscode
4+
.git
5+
docs
6+
target

Dockerfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
FROM rust:slim as builder
1+
FROM rust:1.75-slim-bookworm as builder
22

3-
RUN apt-get update && apt-get -y install protobuf-compiler gcc-multilib musl-tools
3+
RUN apt-get update && apt-get -y install protobuf-compiler
44
WORKDIR /app
55
COPY . .
6-
RUN rustup target add x86_64-unknown-linux-musl
7-
RUN cargo build --release --target x86_64-unknown-linux-musl
6+
RUN cargo build --release
87

9-
FROM debian:bullseye-slim as runner
8+
FROM debian:bookworm-slim as runner
109
RUN apt-get update
1110
RUN apt-get install -y --fix-missing pcscd yubikey-manager python3 python3-pip gnupg libc6 sysvinit-utils pcsc-tools libccid libnss3-tools openssl
1211
RUN apt-get clean
13-
RUN pip install yubikey-manager
1412

1513
FROM runner
1614
RUN service pcscd start
1715
WORKDIR /app
18-
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/yubikey-provision /usr/local/bin
16+
COPY --from=builder /app/target/release/yubikey-provision /usr/local/bin
1917
ENTRYPOINT ["/usr/local/bin/yubikey-provision"]

rust-toolchain.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[toolchain]
2+
channel = "1.75"

0 commit comments

Comments
 (0)