-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile.00
60 lines (50 loc) · 2.31 KB
/
Dockerfile.00
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
56
57
58
59
60
FROM quay.io/kairos/core-ubuntu-22-lts:latest as base
RUN mkdir -p /run/lock
RUN touch /usr/libexec/.keep
RUN mkdir -p /var/cache/apt/archives/partial
RUN curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmour -o /etc/apt/trusted.gpg.d/kubernetes-xenial.gpg
RUN apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main" -y
RUN apt-get update && apt-get install -y --no-install-recommends \
containerd \
runc \
kubelet=1.28.0-00 \
kubeadm=1.28.0-00 \
kubectl=1.28.0-00 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN mkdir -p /etc/containerd/
COPY assets/90-override.conf /etc/sysctl.d/90-override.conf
COPY assets/netfilter.conf /etc/modules-load.d/netfilter.conf
COPY assets/config.toml /etc/containerd/config.toml
# Copy the Kairos framework files. We use master builds here for fedora. See https://quay.io/repository/kairos/framework?tab=tags for a list
COPY --from=quay.io/kairos/framework:master_ubuntu-22-lts / /
# Set the Kairos arguments in os-release file to identify your Kairos image
FROM quay.io/kairos/osbuilder-tools:latest as osbuilder
RUN zypper install -y gettext
RUN mkdir /workspace
COPY --from=base /etc/os-release /workspace/os-release
# You should change the following values according to your own versioning and other details
RUN OS_NAME=kairos-vadim-ubuntu \
OS_VERSION=v1.0.0 \
OS_ID="kairos" \
BUG_REPORT_URL="https://github.com/vadimzharov/k8s-rpi-cluster/issues" \
HOME_URL="https://github.com/vadimzharov/k8s-rpi-cluster" \
OS_REPO="quay.io/vadimzharov/core-ubuntu" \
OS_LABEL="latest" \
GITHUB_REPO="vadimzharov/k8s-rpi-cluster" \
VARIANT="core" \
FLAVOR="ubuntu" \
/update-os-release.sh
FROM base
COPY --from=osbuilder /workspace/os-release /etc/os-release
# Activate Kairos services
RUN systemctl enable cos-setup-reconcile.timer && \
systemctl enable cos-setup-fs.service && \
systemctl enable cos-setup-boot.service && \
systemctl enable cos-setup-network.service
## Generate initrd
RUN kernel=$(ls /boot/vmlinuz-* | head -n1) && \
ln -sf "${kernel#/boot/}" /boot/vmlinuz
RUN kernel=$(ls /lib/modules | head -n1) && \
dracut -v -N -f "/boot/initrd-${kernel}" "${kernel}" && \
ln -sf "initrd-${kernel}" /boot/initrd && depmod -a "${kernel}"
RUN rm -rf /boot/initramfs-*