How can I create an Ubuntu-based image? #989
-
I'm trying to create an Ubuntu-based image and running into some problems. Please help DockerfileARG K3S_VERSION=v1.22.6-k3s1
FROM rancher/k3s:${K3S_VERSION} AS k3s
FROM ubuntu:20.04
COPY --from=k3s / /
RUN mkdir -p /etc \
&& echo 'hosts: files dns' > /etc/nsswitch.conf \
&& chmod 1777 /tmp \
&& mkdir -p /var/lib/rancher/k3s/agent/etc/containerd/
VOLUME /var/lib/kubelet
VOLUME /var/lib/rancher/k3s
VOLUME /var/lib/cni
VOLUME /var/log
ENV PATH="$PATH:/bin/aux"
ENTRYPOINT ["/bin/k3s"]
CMD ["agent"] I'm building this with
The full container logs are available here. Here's a couple of (potentially) relevant highlights:
This makes me wonder that So, where do I go from here? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
It seems that there's a conflict with ARG K3S_VERSION=v1.22.6-k3s1
FROM rancher/k3s:${K3S_VERSION} AS k3s
FROM ubuntu:20.04
COPY --from=k3s /bin /bin
RUN mkdir -p /etc \
&& echo 'hosts: files dns' > /etc/nsswitch.conf \
&& chmod 1777 /tmp \
&& mkdir -p /var/lib/rancher/k3s/agent/etc/containerd/
VOLUME /var/lib/kubelet
VOLUME /var/lib/rancher/k3s
VOLUME /var/lib/cni
VOLUME /var/log
ENV PATH="$PATH:/bin/aux"
ENV CRI_CONFIG_FILE="/var/lib/rancher/k3s/agent/etc/crictl.yaml"
ENTRYPOINT ["/bin/k3s"]
CMD ["agent"] |
Beta Was this translation helpful? Give feedback.
-
why is this not in the global config? ie https://github.com/k3d-io/k3d/blob/main/docs/usage/advanced/cuda/Dockerfile |
Beta Was this translation helpful? Give feedback.
It seems that there's a conflict with
/usr/bin
- just copying the/bin
seems to work. This is now myDockerfile