forked from kairos-io/kairos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.opensuse-arm-rpi
127 lines (109 loc) · 2.69 KB
/
Dockerfile.opensuse-arm-rpi
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
ARG LUET_VERSION=0.22.7-1
ARG BASE_IMAGE=opensuse/leap:15.3
FROM golang as builder
COPY ./ /work
WORKDIR /work/cli
RUN CGO_ENABLED=0 go build -o c3os
FROM quay.io/luet/base:$LUET_VERSION AS luet
FROM $BASE_IMAGE
ARG K3S_VERSION
ARG C3OS_VERSION
ARG ARCH=arm64
ENV ARCH=${ARCH}
# Enable cosign keyless verify
# Temporary disable
ENV COSIGN_EXPERIMENTAL=0
# Repo containing signatures
ENV COSIGN_REPOSITORY=raccos/releases-green
# Skip this repo artifacts verify as they are not signed
ENV COSIGN_SKIP=".*quay.io/c3os/.*"
COPY --from=builder /work/cli/c3os /usr/bin/c3os
RUN zypper ar -G https://download.opensuse.org/repositories/utilities/openSUSE_Leap_15.3/utilities.repo && zypper ref
RUN zypper in -y \
raspberrypi-eeprom \
bcm43xx-firmware \
wireless-tools \
wpa_supplicant \
iw \
systemd-sysvinit \
grub2-arm64-efi \
bash-completion \
conntrack-tools \
coreutils \
curl \
device-mapper \
dosfstools \
dracut \
e2fsprogs \
findutils \
gawk \
gptfdisk \
grub2-i386-pc \
grub2-x86_64-efi \
nohang \
haveged \
htop \
iproute2 \
iptables \
iputils \
issue-generator \
jq \
kernel-default \
kernel-firmware-all \
less \
lsscsi \
lvm2 \
mdadm \
multipath-tools \
nano \
nethogs \
nfs-utils \
open-iscsi \
open-vm-tools \
parted \
pigz \
policycoreutils \
procps \
python-azure-agent \
qemu-guest-agent \
rng-tools \
rsync \
squashfs \
strace \
systemd \
systemd-sysvinit \
tar \
timezone \
tmux \
vim \
which && zypper cc
# Copy the luet config file pointing to the upgrade repository
COPY repositories.yaml /etc/luet/luet.yaml
# Copy luet from the official images
COPY --from=luet /usr/bin/luet /usr/bin/luet
# Install cosign packages
RUN luet install -y meta/cos-verify
RUN luet install -y \
meta/cos-core \
utils/edgevpn \
systemd-service/edgevpn \
utils/k9s \
container/kubectl \
utils/nerdctl && luet cleanup
ENV INSTALL_K3S_VERSION=${K3S_VERSION}
ENV INSTALL_K3S_BIN_DIR="/usr/bin"
RUN curl -sfL https://get.k3s.io > installer.sh
RUN INSTALL_K3S_SKIP_START="true" INSTALL_K3S_SKIP_ENABLE="true" sh installer.sh
RUN INSTALL_K3S_SKIP_START="true" INSTALL_K3S_SKIP_ENABLE="true" sh installer.sh agent
RUN rm -rf installer.sh
RUN systemctl enable nohang
COPY overlay/files/ /
COPY overlay/files-opensuse-arm-rpi/ /
RUN mkinitrd
RUN ln -sf Image /boot/vmlinuz
ARG OS_NAME=c3OS
ARG OS_VERSION=${K3S_VERSION}${C3OS_VERSION}
ARG OS_REPO=quay.io/c3os/c3os
ARG OS_LABEL=latest
RUN envsubst >/etc/os-release </usr/lib/os-release.tmpl && \
rm /usr/lib/os-release.tmpl