Building a Docker image on 2.0

docker
2.0

#1

I’m having issues starting Docker on 2.0, initially I tried circleci/build-image but this ran in to an issue starting docker (at ulimit -n 1048576). I assumed I could get around this and needed some other packages anyway, so I created my own image on Docker hub and added a cheeky RUN sed -i.bkup 's/\(ulimit.*\)$/echo "\1"/g' /etc/init.d/docker hoping that would resolve it. Now I’m hitting:

    time="2017-08-02T09:50:44.847326725Z" level=error msg="'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded." 
    time="2017-08-02T09:50:44.848893185Z" level=error msg="'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded." 
    time="2017-08-02T09:50:44.856695015Z" level=info msg="Graph migration to content-addressability took 0.00 seconds" 
    time="2017-08-02T09:50:44.857071975Z" level=warning msg="Your kernel does not support swap memory limit" 
    time="2017-08-02T09:50:44.857134649Z" level=warning msg="Your kernel does not support cgroup rt period" 
    time="2017-08-02T09:50:44.857150700Z" level=warning msg="Your kernel does not support cgroup rt runtime" 
    time="2017-08-02T09:50:44.857609647Z" level=info msg="Loading containers: start." 
    time="2017-08-02T09:50:44.859266340Z" level=warning msg="Running modprobe bridge br_netfilter failed with message: modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-83-generic/modules.dep.bin'\nmodprobe: WARNING: Module bridge not found in directory /lib/modules/4.4.0-83-generic\nmodprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-83-generic/modules.dep.bin'\nmodprobe: WARNING: Module br_netfilter not found in directory /lib/modules/4.4.0-83-generic\n, error: exit status 1" 
    time="2017-08-02T09:50:44.860634546Z" level=warning msg="Running modprobe nf_nat failed with message: `modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-83-generic/modules.dep.bin'\nmodprobe: WARNING: Module nf_nat not found in directory /lib/modules/4.4.0-83-generic`, error: exit status 1" 
    time="2017-08-02T09:50:44.861905774Z" level=warning msg="Running modprobe xt_conntrack failed with message: `modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-83-generic/modules.dep.bin'\nmodprobe: WARNING: Module xt_conntrack not found in directory /lib/modules/4.4.0-83-generic`, error: exit status 1" 
    Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain: iptables failed: iptables -t nat -N DOCKER: iptables v1.6.0: can't initialize iptables table `nat': Permission denied (you must be root)

Is it possible to run Docker within docker, you have documentation suggesting it is, am I missing something obvious?


#2

OK I got this working by adding the setup-docker-engine step. However I stumbled across this in the forums, not in the documentation!


Alternatives to iptables on CircleCI 2.0
#3

For reference, the documentation is in “Running Docker Commands”.


#4

Out of interest, I have it working using - setup-docker-engine which isn’t referenced in that link. Is that an alias, or something different?


#5

Ah, my mistake. I thought you were referencing setup_remote_docker. I’m not aware of setup-docker-engine. It seems that all the references to setup-docker-engine in forum posts would probably be superseded by setup_remote_docker. Someone from the CircleCI team would have to confirm that, though.


#6

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.