Files
kata-containers/kata-deploy/Dockerfile
Eric Ernst 4f89e97e5e kata-deploy: look for kata artifacts locally
When building the kata-deploy images before, we would look to pull the
latest artifacts from the release URL.

It would be better to allow the user to pull from this URL, or to create
the artifacts locally, and pass the location of this tar.xz to the build
process.

Instead of providing KATA_VER, builders should provide KATA_ARTIFACTS,
which is the filename that is assumed to be located within the docker
build path.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-10-22 14:47:42 -07:00

23 lines
743 B
Docker

FROM centos/systemd
ARG KUBE_ARCH=amd64
ARG KATA_ARTIFACTS=./kata-static.tar.xz
ARG DESTINATION=/opt/kata-artifacts
COPY ${KATA_ARTIFACTS} .
RUN \
yum install -y epel-release && \
yum install -y bzip2 jq && \
mkdir -p ${DESTINATION} && \
tar xvf ${KATA_ARTIFACTS} -C ${DESTINATION}/ && \
chown -R root:root ${DESTINATION}/
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 ${DESTINATION}/scripts
RUN \
ln -s ${DESTINATION}/scripts/kata-deploy-docker.sh /usr/bin/kata-deploy-docker && \
ln -s ${DESTINATION}/scripts/kata-deploy.sh /usr/bin/kata-deploy