-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile
44 lines (32 loc) · 1.49 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
ARG BUILDER=registry.access.redhat.com/ubi8/ubi
FROM $BUILDER as builder
ENV DRBD_REACTOR_VERSION 1.7.0
ENV DRBD_REACTOR_TGZNAME drbd-reactor
ENV DRBD_REACTOR_TGZ ${DRBD_REACTOR_TGZNAME}-${DRBD_REACTOR_VERSION}.tar.gz
USER root
RUN yum -y update-minimal --security --sec-severity=Important --sec-severity=Critical && yum install -y cargo rust wget && yum clean all -y # !lbbuild
# one can not comment COPY
RUN cd /tmp && wget https://pkg.linbit.com/downloads/drbd/utils/${DRBD_REACTOR_TGZ} # !lbbuild
# =lbbuild COPY /${DRBD_REACTOR_TGZ} /tmp/
# =lbbuild USER makepkg
RUN test -f $HOME/.cargo/env || install -D /dev/null $HOME/.cargo/env
RUN cd /tmp && tar xvf ${DRBD_REACTOR_TGZ} && cd ${DRBD_REACTOR_TGZNAME}-${DRBD_REACTOR_VERSION} && \
. $HOME/.cargo/env && cargo install --path . --bin drbd-reactor && \
cp $HOME/.cargo/bin/drbd-reactor /tmp && \
cp ./example/drbd-reactor.toml /tmp
FROM quay.io/linbit/drbd-utils
LABEL maintainer="Roland Kammerer <[email protected]>"
ENV DRBD_REACTOR_VERSION 1.7.0
ARG release=1
LABEL name="drbd-reactor" \
vendor="LINBIT" \
version="$DRBD_REACTOR_VERSION" \
release="$release" \
summary="DRBD events reaction via plugins" \
description="DRBD events reaction via plugins"
COPY COPYING /licenses/Apache-2.0.txt
COPY --from=builder /tmp/drbd-reactor /usr/sbin
COPY --from=builder /tmp/drbd-reactor.toml /etc
RUN yum -y update-minimal --security --sec-severity=Important --sec-severity=Critical && \
yum clean all -y
ENTRYPOINT ["/usr/sbin/drbd-reactor"]