[opensuse-buildservice] How to setup workers to build Dockerfile based images?
Hello List, I wanted to build a few Docker images using Dockerfile instead of KIWI on my private Build Service instance. But no matter what I try, I'm unable to proceed. Looks like I'm missing some setup on my workers. I just can't figure out by myself as to what is missing! Please help! I'll share what I've tried and found so far... I'm running: # rpm -q obs-{api,server} build obs-api-2.9.3-49.1.noarch obs-server-2.9.3-49.1.noarch build-20200107-329.1.noarch I started with a very minimalist Dockerfile: $ cat Dockerfile #!UseOBSRepositories zypper in coreutils iputils Not sure whether that was the problem! :-) But the build failed with: [ 53s] find: 'containers': No such file or directory [ 53s] base image not found This "find" command comes from this line of build-recipe-docker: https://github.com/openSUSE/obs-build/blob/20200107/build-recipe-docker#L62 This "containers" directory is supposed to be created by bs_worker. But bs_worker will only create this directory when 'containerannotation' is set. From what I understand, this containerannotation is set by BSSched::BuildJob::getcontainerannotation: https://github.com/openSUSE/open-build-service/blob/2.9/src/backend/BSSched/... This is where I'm lost. I am building a Dockerfile in an empty project. Next, I added one more line: #!UseOBSRepositories FROM scratch zypper in coreutils iputils This was because the "find containers" command is run only when base image is not set to "scratch". With this Dockerfile, build fails because "startdockerd" cannot execute modprobe and other commands: [ 44s] ----------------------------------------------------------------- [ 44s] ----- building Dockerfile [ 44s] ----------------------------------------------------------------- [ 44s] ----------------------------------------------------------------- [ 44s] Unsharing environment [ 44s] /.build/startdockerd: line 106: modprobe: command not found [ 44s] /.build/startdockerd: line 107: modprobe: command not found [ 44s] /.build/startdockerd: line 108: modprobe: command not found [ 44s] /.build/startdockerd: line 109: modprobe: command not found [ 44s] Starting local repository server [ 44s] Starting container daemon [ 44s] Starting docker daemon ... [ 44s] time="2020-06-10T07:59:20.606243982Z" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.aufs" error="modprobe aufs failed: "": exec: "modprobe": executable file not found in $PATH" ... [ 45s] failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?) [ 45s] Perhaps iptables or your kernel needs to be upgraded. [ 45s] (exit status 3) [ 56s] Docker is dead [ 56s] /.build/startdockerd: line 20: kill: (1587) - No such process What am I missing? Regards, Srinidhi.
participants (1)
-
Srinidhi B