forked from ortelius/emporous-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Containerfile
34 lines (29 loc) · 823 Bytes
/
Containerfile
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
## Build a UBI micro rootfs from UBI repositories
FROM registry.access.redhat.com/ubi9/ubi as builder
ARG DNF_FLAGS="\
-y \
--nodocs \
--releasever 9 \
--setopt install_weak_deps=false \
--installroot \
"
ARG DNF_PACKAGES="\
openssl \
coreutils-single \
glibc-minimal-langpack \
"
ARG ROOTFS="/rootfs"
RUN set -ex \
&& mkdir -p ${ROOTFS} \
&& dnf install ${DNF_FLAGS} ${ROOTFS} ${DNF_PACKAGES} \
&& dnf clean all ${DNF_FLAGS} ${ROOTFS} \
&& rm -rf ${ROOTFS}/var/cache/* \
&& echo
## Build a container from UBI micro rootfs and load platform specific artifact
FROM scratch
COPY --from=builder /rootfs/ /
ARG TARGETARCH
COPY emporous-linux-${TARGETARCH} /usr/local/bin/emporous
RUN set -ex && /usr/local/bin/emporous version
ENTRYPOINT ["/usr/local/bin/emporous"]
CMD ["version"]