Files
kata-containers/kata-deploy/Dockerfile
Eric Ernst c0cdc045a5 kata-deploy: add script for configuring Docker
Before the kata-deploy container image was intended to be
used with only Kubernetes.  This commit adds a script for configuring
Kata to run with Docker.

This assumes > release 1.5 of Kata, as Firecracker is being configured
as well as QEMU based Kata. Note, in order for this to work, Docker must
be configured to use a block-based storage driver.

To succeed, it the following directories must be mounted:
- /opt/kata - this is the location that the kata artifacts are stored
- /run/systemd - for reloading the docker service
- /var/run/dbus - for reloading the docker service
- /etc/docker - for updating the docker configuration (daemon.json)

usage: kata-deploy-kata [install | remove]

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-01-31 21:12:40 -08:00

24 lines
850 B
Docker

FROM centos/systemd
ARG KATA_VER
ARG ARCH=x86_64
ARG KUBE_ARCH=amd64
ARG KATA_URL=https://github.com/kata-containers/runtime/releases/download/${KATA_VER}
ARG KATA_FILE=kata-static-${KATA_VER}-${ARCH}.tar.xz
RUN \
yum install -y epel-release && \
yum install -y bzip2 jq && \
curl -sOL ${KATA_URL}/${KATA_FILE} && \
mkdir -p /opt/kata-artifacts && \
tar xvf ${KATA_FILE} -C /opt/kata-artifacts/ && \
rm ${KATA_FILE}
RUN \
curl -Lso /bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/${KUBE_ARCH}/kubectl && \
chmod +x /bin/kubectl
COPY scripts /opt/kata-artifacts/scripts
RUN \
ln -s /opt/kata-artifacts/scripts/kata-deploy-docker.sh /usr/bin/kata-deploy-docker && \
ln -s /opt/kata-artifacts/scripts/kata-deploy.sh /usr/bin/kata-deploy