-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (34 loc) · 1.06 KB
/
Dockerfile
File metadata and controls
42 lines (34 loc) · 1.06 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
FROM quay.io/fedora/fedora:42 as build
#
# Build dependencies
#
RUN dnf install -y rust cargo libzstd-devel git openssl-devel \
glib2-devel ghc-gio ostree-devel patch
#
# Build ostree-rs-ext
#
# Required to unencapsulate OCI to ostree
# rpm-ostree seems to not have the ability.
# It is not provided as a package in fedora.
COPY ./ostree-ext-cli /sources/ostree-ext-cli
WORKDIR /sources/ostree-ext-cli
RUN cargo fetch
RUN cargo build --release
# Remove dependencies
FROM quay.io/fedora/fedora:42
# Install niceties
RUN dnf install -y python3 python3-pip python3-devel rsync git tree \
libzstd openssl glib2 ghc-gio ostree skopeo selinux-policy-targeted
# Copy the built binary after installing deps
COPY --from=build /sources/ostree-ext-cli/target/release/ostree-ext-cli \
/usr/bin/ostree-ext-cli
# Install rechunk
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
RUN mkdir -p /sources/rechunk
COPY . /sources/rechunk/
RUN pip install --no-cache-dir /sources/rechunk/
#
# Post-build niceties
#
WORKDIR /workspace