-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile.k3s
More file actions
27 lines (21 loc) · 1.04 KB
/
Copy pathContainerfile.k3s
File metadata and controls
27 lines (21 loc) · 1.04 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
###############################################################################
# server4home-k3s — layered flavor that adds K3s to the base image.
#
# Mode (server / agent) is decided at *runtime* by /etc/server4home/k3s.conf,
# so the same image works for both "start a new cluster" and "join an existing
# cluster" deployments. See build/k3s/files/etc/server4home/k3s.conf.example.
###############################################################################
ARG BASE_IMAGE=localhost/server4home:stable
ARG K3S_VERSION=v1.35.4+k3s1
FROM ${BASE_IMAGE}
# Re-declare ARGs after FROM so they're visible in this stage.
ARG K3S_VERSION
# Stage K3s files into the rootfs (systemd unit, dnf repo, example conf).
COPY build/k3s/files/ /
COPY build/k3s/install.sh /tmp/install-k3s.sh
# Install K3s binary, SELinux policy, kubectl/crictl/ctr symlinks, enable unit.
RUN --mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
K3S_VERSION="${K3S_VERSION}" bash /tmp/install-k3s.sh \
&& rm -f /tmp/install-k3s.sh
RUN bootc container lint