-
Notifications
You must be signed in to change notification settings - Fork 43
/
Dockerfile
30 lines (20 loc) · 1.14 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
FROM ubuntu:22.04 as builder
RUN apt-get update && apt-get install -y git libpq-dev curl build-essential libgpgme-dev pkg-config libssl-dev libglib2.0-dev libostree-dev
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \
sh rustup.sh -y -q
ADD . /src
RUN cd /src && /root/.cargo/bin/cargo build --release
RUN git clone https://github.com/jameswestman/flathub-hooks.git
RUN cd flathub-hooks && /root/.cargo/bin/cargo build --release
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y flatpak ostree libpq5 ca-certificates && \
rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/bin/gpg /usr/bin/gpg2
ADD https://github.com/openSUSE/catatonit/releases/download/v0.1.7/catatonit.x86_64 /usr/local/bin/catatonit
RUN chmod +x /usr/local/bin/catatonit
COPY --from=builder /src/target/release/flat-manager /usr/local/bin/flat-manager
COPY --from=builder /src/target/release/delta-generator-client /usr/local/bin/delta-generator-client
COPY --from=builder /flathub-hooks/target/release/flathub-hooks /usr/local/bin/flathub-hooks
ENV RUST_BACKTRACE=1
ENTRYPOINT ["/usr/local/bin/catatonit", "--"]
CMD ["/usr/local/bin/flat-manager"]