<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>kernelcafe &amp;mdash; unfinished.bike</title>
    <link>https://unfinished.bike/tag:kernelcafe</link>
    <description>a compendium of half-finished projects by thomas strömberg - &lt;a rel=&#34;me&#34; href=&#34;https://triangletoot.party/@thomrstrom&#34;&gt;@thomrstrom&lt;/a&gt;</description>
    <pubDate>Fri, 24 Apr 2026 04:36:48 +0000</pubDate>
    <item>
      <title>Persistent multi-user Docker on macOS</title>
      <link>https://unfinished.bike/persistent-multi-user-docker-on-macos?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[&#xA;&#xA;Ever wanted to run Docker on an unmanned macOS machine, where all users could have access to a working Docker command-line?&#xA;&#xA;First, be aware that docker is not designed to be securely shared among multiple users. As with Linux, Please assume that anyone who has access to docker is effectively equivalent to \`root&#39;.&#xA;&#xA;!--more--&#xA;&#xA;This assumes that users will be interacting with docker via the command-line, rather than graphically. It also assumes that the environment is such that allows a single user to be automatically logged into via the GUI, but this is mostly out of laziness rather than an underlying technical restriction.&#xA;&#xA;Choose an account that Docker Desktop will run as. I recommend creating a docker user, but it could be any account. This account does not need admin access.&#xA;&#xA;Open Settings -  Users &amp; Groups -  Login Options, and ensure that this user is automatically logged into.&#xA;&#xA;Created a shared containers directory:&#xA;&#xA;sudo mkdir -p /Users/Shared/Library/Containers&#xA;sudo chown docker:staff /Users/Shared/Library/Containers&#xA;sudo chmod -R 770 /Users/Shared/Library/Containers/&#xA;&#xA;Login graphically with the account that will run Docker and start /Applications/Docker.app, answer any questions it might have.&#xA;&#xA;Open Settings -  Users &amp; Groups -  Login Items, and drag the Docker app to it.&#xA;&#xA;Quit Docker Desktop via the menu item&#xA;&#xA;Open Terminal and move your Docker data to a shared location that can be written to by other users:&#xA;&#xA;mv ~/Library/Containers/com.docker.docker /Users/Shared/Library/Containers&#xA;&#xA;chmod -R 770 /Users/Shared/Library/Containers/com.docker.docker&#xA;&#xA;chmod -R +a &#34;group:staff allow list,addfile,search,addsubdirectory,deletechild,readattr,writeattr,readextattr,writeextattr,readsecurity,fileinherit,directory_inherit&#34; /Users/Shared/Library/Containers/com.docker.docker&#xA;&#xA;chmod -R g+rw /Users/Shared/Library/Containers/com.docker.docker/Data&#xA;&#xA;Then link your local Docker data to this shared source, and make sure that others can traverse into this folder to resolve the socket symlink:&#xA;&#xA;ln -s /Users/Shared/Library/Containers/com.docker.docker ~/Library/Containers/com.docker.docker&#xA;&#xA;chmod g+x ~/Library ~/Library/Containers&#xA;&#xA;Restart /Applications/Docker.app to test&#xA;&#xA;SSH into the host as another username, and run docker run mariadb to test.&#xA;&#xA;Reboot host and reconnect via ssh to test (it may take a moment for Docker to start up)&#xA;&#xA;This is the configuration we use for the #kernelcafe. Please add your improvements to the comments!]]&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://i.snap.as/o4QoLGWZ.webp" alt=""/></p>

<p>Ever wanted to run Docker on an unmanned macOS machine, where all users could have access to a working Docker command-line?</p>

<p>First, be aware that <code>docker</code> is not designed to be securely shared among multiple users. As with Linux, Please assume that anyone who has access to <code>docker</code> is effectively equivalent to `root&#39;.</p>



<p>This assumes that users will be interacting with <code>docker</code> via the command-line, rather than graphically. It also assumes that the environment is such that allows a single user to be automatically logged into via the GUI, but this is mostly out of laziness rather than an underlying technical restriction.</p>
<ol><li><p>Choose an account that Docker Desktop will run as. I recommend creating a <code>docker</code> user, but it could be any account. This account does not need admin access.</p></li>

<li><p>Open <code>Settings -&gt; Users &amp; Groups -&gt; Login Options</code>, and ensure that this user is automatically logged into.</p></li>

<li><p>Created a shared containers directory:</p></li></ol>

<pre><code>sudo mkdir -p /Users/Shared/Library/Containers
sudo chown docker:staff /Users/Shared/Library/Containers
sudo chmod -R 770 /Users/Shared/Library/Containers/
</code></pre>
<ol><li><p>Login graphically with the account that will run Docker and start <code>/Applications/Docker.app</code>, answer any questions it might have.</p></li>

<li><p>Open <code>Settings -&gt; Users &amp; Groups -&gt; Login Items</code>, and drag the <code>Docker</code> app to it.</p></li>

<li><p>Quit <code>Docker Desktop</code> via the menu item</p></li>

<li><p>Open <code>Terminal</code> and move your Docker data to a shared location that can be written to by other users:</p></li></ol>

<pre><code>mv ~/Library/Containers/com.docker.docker /Users/Shared/Library/Containers

chmod -R 770 /Users/Shared/Library/Containers/com.docker.docker

chmod -R +a &#34;group:staff allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit&#34; /Users/Shared/Library/Containers/com.docker.docker

chmod -R g+rw /Users/Shared/Library/Containers/com.docker.docker/Data
</code></pre>

<p>Then link your local Docker data to this shared source, and make sure that others can traverse into this folder to resolve the socket symlink:</p>

<pre><code>ln -s /Users/Shared/Library/Containers/com.docker.docker ~/Library/Containers/com.docker.docker

chmod g+x ~/Library ~/Library/Containers
</code></pre>
<ol><li><p>Restart <code>/Applications/Docker.app</code> to test</p></li>

<li><p>SSH into the host as another username, and run <code>docker run mariadb</code> to test.</p></li>

<li><p>Reboot host and reconnect via ssh to test (it may take a moment for Docker to start up)</p></li></ol>

<p>This is the configuration we use for the <a href="https://unfinished.bike/tag:kernelcafe" class="hashtag"><span>#</span><span class="p-category">kernelcafe</span></a>. Please add your improvements to the comments!</p>
]]></content:encoded>
      <guid>https://unfinished.bike/persistent-multi-user-docker-on-macos</guid>
      <pubDate>Mon, 01 Feb 2021 16:36:01 +0000</pubDate>
    </item>
  </channel>
</rss>