-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.micro
More file actions
55 lines (50 loc) · 1.93 KB
/
Copy pathDockerfile.micro
File metadata and controls
55 lines (50 loc) · 1.93 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
43
44
45
46
47
48
49
50
51
52
53
54
55
#################################################################################
# Builder Image
FROM registry.access.redhat.com/ubi8/ubi as builder
ARG BUILD_PATH='/rootfs'
#################################################################################
# DNF Package Install List
ARG DNF_LIST="\
openssl \
coreutils-single \
glibc-minimal-langpack \
"
#################################################################################
# DNF Package Install Flags
ARG DNF_FLAGS="\
-y \
--releasever 8 \
--installroot /rootfs \
"
ARG DNF_FLAGS_EXTRA="\
--nodocs \
--setopt=install_weak_deps=false \
${DNF_FLAGS} \
"
#################################################################################
# Build Rootfs
RUN set -ex \
&& mkdir -p ${BUILD_PATH} \
&& dnf install ${DNF_FLAGS_EXTRA} ${DNF_LIST} \
&& dnf clean all ${DNF_FLAGS} \
&& cp -f /etc/yum.repos.d/ubi.repo ${BUILD_PATH}/etc/yum.repos.d/ubi.repo \
&& rm -rf \
${BUILD_PATH}/var/cache/* \
&& echo
#################################################################################
# Build Image from Rootfs
FROM scratch
COPY --from=builder /rootfs /
CMD /bin/sh
#################################################################################
# Finalize Image
MAINTAINER ContainerCraft.io
LABEL \
license=GPLv3 \
name="cloudctl-base" \
distribution-scope="public" \
io.openshift.tags="cloudctl-base" \
io.k8s.display-name="cloudctl-base" \
summary="CloudCtl Base Image | Micro Red Hat UBI Supportable Image" \
description="CloudCtl Base Image | Micro Red Hat UBI Supportable Image" \
io.k8s.description="CloudCtl Base Image | Micro Red Hat UBI Supportable Image"