<div>Hi guys</div><br><div>I'm not a docker expert at all, but I thought it might be interesting to get the SelfVM working on docker, not so much for security but to make it easier to use the VM.</div><br><div>I've put up a script at <a href="https://link.getmailspring.com/link/55C16E53-59CF-4BB0-8663-C48AB637A188@getmailspring.com/0?redirect=https%3A%2F%2Fgithub.com%2Frussellallen%2Fdockerself&recipient=U2VsZi1pbnRlcmVzdEBsaXN0cy5zZWxmbGFuZ3VhZ2Uub3Jn" title="https://github.com/russellallen/dockerself">https://github.com/russellallen/dockerself</a> but its really short so I'll past it below. </div><br><div>Basically the steps are<span data-emoji-typing="true">:</span></div><code><pre style="background-color:rgba(0,0,0,0.05);padding:0.2em 1em">1 - install docker<br>2 - git clone <a href="https://link.getmailspring.com/link/55C16E53-59CF-4BB0-8663-C48AB637A188@getmailspring.com/1?redirect=https%3A%2F%2Fgithub.com%2Frussellallen%2Fdockerself&recipient=U2VsZi1pbnRlcmVzdEBsaXN0cy5zZWxmbGFuZ3VhZ2Uub3Jn" title="https://github.com/russellallen/dockerself">https://github.com/russellallen/dockerself</a><br>3 - cd dockerself<br>4 - ./selfvm -s mysnapshot.self --resetXDisplays</pre></code><div>The first time you run this, it will download some docker image layers but these will be cached so it only happens once.</div><br><div>The morphic desktop can be accessed through your webbrowser at http://localhost:10000/index.html?encoding=rgb32&password=111</div><br><div>The flag --resetXDisplays tells the Self world to read the X display from the $DISPLAY environment variable, otherwise it uses whatever it used last time the snapshot was saved.</div><br><div>I've briefly tested on a Mac and Linux (a recent Ubuntu) and it seems to work. I haven't tested on Windows, if anyone wants to try that would be fabulous.</div><br><div>There doesn't seem to be a good way to pass the entire host filesystem to the container, instead I've mounted the home directory at /host inside the container.</div><br><div>Let me know how you go, also if anyone is actually experienced in using docker in anger and has a better way of doing things, please pipe up.</div><br><div>Have fun,</div><div>Russell</div><br><code><pre style="background-color:rgba(0,0,0,0.05);padding:0.2em 1em">#!/bin/sh<br><br>NAME=$(uuidgen)<br><br>docker run -d \<br> --name $NAME  \<br> -e MODE="tcp" \<br> -e XPRA_HTML="yes" \<br> -e DISPLAY=:14 \<br> -e XPRA_PASSWORD=111 \<br> -p 10000:10000 \<br> --rm \<br> jare/x11-bridge >/dev/null 2>&1<br><br>echo <br>echo 'Welcome to Self on Docker'<br>echo<br>echo 'The host system is mounted at /host'<br>echo<br>echo 'Open GUI on:  http://localhost:10000/index.html?encoding=rgb32&password=111'<br>echo <br>echo<br><br># This is annoying but gives xpra time to wake up<br>sleep 5<br><br>docker run    \<br>  --net host  \<br>  -it         \<br>  --rm        \<br>  --volume "$HOME:/host/$HOME" \<br>  --workdir "/host/$PWD" \<br>  -h "$HOSTNAME" \<br>  --volumes-from $NAME \<br>  -e DISPLAY=:14 \<br> russellallen/selfvm:alpha1 $@<br><br>docker kill $NAME >/dev/null 2>&1<br><br></pre></code><div><br></div><br><blockquote>g</blockquote><img class="mailspring-open" alt="Sent from Mailspring" width="0" height="0" style="border:0; width:0; height:0;" src="https://link.getmailspring.com/open/55C16E53-59CF-4BB0-8663-C48AB637A188@getmailspring.com?me=f11af419&recipient=U2VsZi1pbnRlcmVzdEBsaXN0cy5zZWxmbGFuZ3VhZ2Uub3Jn">