<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11845</bug_id>
          
          <creation_ts>2017-07-27 13:46:00 +0000</creation_ts>
          <short_desc>Docker daemon does not start on boot, error in Docker init script</short_desc>
          <delta_ts>2017-12-06 17:28:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Layer Index</product>
          <component>Layer Index</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexandru Tiniuc">tiniuclx</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>brian.avery</cc>
    
    <cc>bruce.ashfield</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>75338</commentid>
    <comment_count>0</comment_count>
    <who name="Alexandru Tiniuc">tiniuclx</who>
    <bug_when>2017-07-27 13:46:00 +0000</bug_when>
    <thetext>Preconditions/Environment
-------------------------
I am working on a custom Raspberry Pi image, it inherits rpi-hwup-image inside the Raspberry Pi BSP. The only change is the addition of docker to IMAGE_INSTALL. As far as I am aware, I am using the latest commits inside the master branches of all layers and dependencies.

Triggering Action/Cause
-----------------------
Booting the image generated by the recipe described above.

Expectation
-----------
Docker Daemon starts, you are able to download, compile and run containers without any other configuration.

Actual Result
-------------
Docker Daemon does not start. Inspection of /var/log/docker.log reveals the following (paraphrased): &quot;The &apos;docker daemon&apos; command is unavailable on Linux. Use &apos;dockerd&apos; instead.&quot;

Reproducibility
---------------
I flashed an SD card with the image ~10 times while trying to figure out why the daemon wouldn&apos;t start. It failed every time until I came up with an apparently working fix.

My Proposed Fix:
----------------
Modify the following file:
meta-virtualization/recipes-containers/docker/files/docker.init

1. Make the value of the prog variable &quot;dockerd&quot; instead of &quot;docker&quot;

2. Inside the start() function definition, change &quot; &quot;$unshare&quot; -m -- $exec daemon ...&quot; to &quot; &quot;$unshare&quot; -m -- $exec &quot; (the word daemon is removed)

Here is a pastebin of git diff showing the aforementioned changes: https://pastebin.com/hkEuz0zX</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75553</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-08-01 09:43:31 +0000</bug_when>
    <thetext>The docker recipe is in meta-virtualization, and I&apos;m afraid that we don&apos;t track bugs in meta-virtualization in the Yocto Project bugzilla (the layer index category is for bugs in the layer index itself, not any particular layer tracked within it). Since you have a proposed change, assuming it is applicable to current meta-virtualization I would recommend submitting a patch for it - see here for details on how you should do that:

http://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/tree/README
http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded

(I have also added Bruce Ashfield, the main maintainer of meta-virtualization, on CC for this bug but it may still get lost in the noise.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75639</commentid>
    <comment_count>2</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2017-08-04 03:04:00 +0000</bug_when>
    <thetext>Thanks Paul!

I did see this message and will look for discussion on the meta-virtualization list.

I&apos;m building and running docker as a default start service on my images every day, so it does work in the master branch. We&apos;d have to look at (and test) any patches in that context.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>