-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
45 lines (37 loc) · 1.16 KB
/
Dockerfile
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
FROM quay.io/fedora/fedora:40 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.
RUN mkdir -p /sources; \
cd /sources; \
git clone --depth 1 -b ostree-ext-v0.15.3 \
https://github.com/ostreedev/ostree-rs-ext ostree-rs-ext;
WORKDIR /sources/ostree-rs-ext
RUN cargo fetch
RUN cargo build --release
# Remove dependencies
FROM quay.io/fedora/fedora:40
# 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-rs-ext/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