kafkanetes icon indicating copy to clipboard operation
kafkanetes copied to clipboard

build error

Open debianmaster opened this issue 9 years ago • 1 comments

jjonagam-osx:kafkanetes cjonagam$ oc logs --follow build/kafkanetes-1
W0510 08:06:50.831601       1 builder.go:55] Master version "v1.1.6-48-g561e4fa" does not match Builder image version "v1.3.0-alpha.0-273-gc12bdaa"
I0510 08:06:50.835367       1 source.go:197] Downloading "https://github.com/jim-minter/kafkanetes.git" ...
Step 1 : FROM rhel
Trying to pull repository docker.io/library/rhel ... Pulling image (latest) from docker.io/library/rhel
Pulling image (latest) from docker.io/library/rhel, endpoint: https://registry.access.redhat.com/v1/
Pulling dependent layers
Download complete
Download complete
Status: Image is up to date for docker.io/rhel:latest
docker.io/library/rhel: this image was pulled from a legacy registry.  Important: This registry version will not be supported in future versions of docker.
 ---> 95612a3264fc
Step 2 : RUN mkdir -p /opt/kafka   && cd /opt/kafka   && ln -s /var/run/secrets/rhel7.repo /etc/yum.repos.d/rhel7.repo   && yum -y install java-1.8.0-openjdk-headless tar   && curl -s http://www.mirrorservice.org/sites/ftp.apache.org/kafka/0.9.0.1/kafka_2.11-0.9.0.1.tgz | tar -xz --strip-components=1   && yum -y remove tar   && yum clean all   && rm /etc/yum.repos.d/rhel7.repo
 ---> Running in e1f6e9606745
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Skipping unreadable repository '/etc/yum.repos.d/rhel7.repo'
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 You can enable repos with yum-config-manager --enable <repo>
F0510 08:06:58.857819       1 builder.go:204] Error: build error: The command '/bin/sh -c mkdir -p /opt/kafka   && cd /opt/kafka   && ln -s /var/run/secrets/rhel7.repo /etc/yum.repos.d/rhel7.repo   && yum -y install java-1.8.0-openjdk-headless tar   && curl -s http://www.mirrorservice.org/sites/ftp.apache.org/kafka/0.9.0.1/kafka_2.11-0.9.0.1.tgz | tar -xz --strip-components=1   && yum -y remove tar   && yum clean all   && rm /etc/yum.repos.d/rhel7.repo' returned a non-zero code: 1

debianmaster avatar May 12 '16 08:05 debianmaster

You need to ensure that the base rhel container you use is able to run yum commands against a RHEL repository at docker build time. I think that if you use the standard rhel container plus run subscription-manager on your nodes, this should more or less "just" work (it may require some minimal change to the Dockerfile, I haven't tested this scenario). I don't use subscription-manager yet; the way I do things is to put a file /etc/yum.repos.d/redhat.repo (it must be this exact filename) on my nodes, which points to my own mirrored yum repository. /etc/yum.repos.d/redhat.repo on the node is automagically provided inside the container as /var/run/secrets/rhel7.repo by the RHEL docker tooling.

If you're aware of ways to make this bootstrapping easier (technical changes, documentation, whatever), please send PRs and I'll merge them.

jim-minter avatar May 12 '16 09:05 jim-minter