Add minimal minikube-automount to the kic image
This only needs to mount the required paths for the storage provisioner, not for docker and minikube etc.pull/8780/head
parent
263bcd3a06
commit
302a6b05f2
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
echo "automount ...";
|
||||
|
||||
if [ -d /var ]; then
|
||||
mkdir -p /var/data
|
||||
mkdir /data
|
||||
mount --bind /var/data /data
|
||||
|
||||
mkdir -p /var/hostpath_pv
|
||||
mkdir /tmp/hostpath_pv
|
||||
mount --bind /var/hostpath_pv /tmp/hostpath_pv
|
||||
|
||||
mkdir -p /var/hostpath-provisioner
|
||||
mkdir /tmp/hostpath-provisioner
|
||||
mount --bind /var/hostpath-provisioner /tmp/hostpath-provisioner
|
||||
fi
|
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=minikube automount
|
||||
Requires=local-fs.target
|
||||
Before=docker.service
|
||||
After=local-fs.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/minikube-automount
|
||||
Type=oneshot
|
||||
RemainAfterExit=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -28,6 +28,11 @@ RUN apt-get install -y --no-install-recommends podman
|
|||
# install varlink
|
||||
RUN apt-get install -y --no-install-recommends varlink
|
||||
|
||||
# automount service
|
||||
COPY automount/minikube-automount /usr/sbin/minikube-automount
|
||||
COPY automount/minikube-automount.service /usr/lib/systemd/system/minikube-automount.service
|
||||
RUN ln -fs /usr/lib/systemd/system/minikube-automount.service \
|
||||
/etc/systemd/system/multi-user.target.wants/minikube-automount.service
|
||||
|
||||
# disable non-docker runtimes by default
|
||||
RUN systemctl disable containerd && systemctl disable crio && rm /etc/crictl.yaml
|
||||
|
|
Loading…
Reference in New Issue