Add dockerfile to build an image with knictl 86/1486/1
authorYolanda Robla <yroblamo@redhat.com>
Thu, 29 Aug 2019 10:52:37 +0000 (12:52 +0200)
committerYolanda Robla <yroblamo@redhat.com>
Thu, 29 Aug 2019 10:52:37 +0000 (12:52 +0200)
In order to run it inside a pod, we need
to have the knictl binary. Create an image that
contains the latest version of it, ready to
use.

Signed-off-by: Yolanda Robla <yroblamo@redhat.com>
Change-Id: I5430699c041f7afc51b74040803e841b29adf608

images/Dockerfile [new file with mode: 0644]

diff --git a/images/Dockerfile b/images/Dockerfile
new file mode 100644 (file)
index 0000000..d49c28a
--- /dev/null
@@ -0,0 +1,14 @@
+FROM registry.redhat.io/rhel8/go-toolset
+USER root
+LABEL maintainer="Yolanda Robla <yroblamo@redhat.com>"
+
+# install knictl
+ENV GOPATH=$HOME/..
+RUN mkdir -p gerrit.akraino.org/kni
+WORKDIR $HOME/gerrit.akraino.org/kni
+RUN git clone https://gerrit.akraino.org/r/kni/installer
+WORKDIR $HOME/gerrit.akraino.org/kni/installer
+RUN make build
+RUN chmod a+x knictl
+RUN mv knictl /usr/local/bin/
+WORKDIR $HOME