-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (20 loc) · 940 Bytes
/
Dockerfile
File metadata and controls
21 lines (20 loc) · 940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM quay.io/fedora/fedora:43 AS builder
RUN dnf install -y cargo git-core libzstd-devel openssl-devel xz-devel
WORKDIR /build
COPY Cargo.* ./
COPY src src/
# Debug symbols are nice but they're not 100+ MB of nice
RUN sed -i 's/^debug = true$/debug = false/' Cargo.toml
# aarch64 release builds running in emulation take too long and time out the
# GitHub Action. Disable optimization.
RUN if [ $(uname -p) != x86_64 ]; then sed -i "s/^debug = false$/debug = false\nopt-level = 0/" Cargo.toml; fi
# Avoid OOM on emulated arm64
# https://github.com/rust-lang/cargo/issues/10583
RUN mkdir -p .cargo && echo -e '[net]\ngit-fetch-with-cli = true' > .cargo/config.toml
RUN cargo build --release
FROM quay.io/fedora/fedora:43
RUN dnf install -y /usr/bin/gpg /usr/bin/kpartx /usr/bin/lsblk \
/usr/bin/udevadm && \
dnf clean all
COPY --from=builder /build/target/release/coreos-installer /usr/bin
ENTRYPOINT ["/usr/bin/coreos-installer"]