<div dir="ltr">Hi everyone,<div><br></div><div>Sometime ago I built and started to use a little tool that I'd like to share with you, in the hope that it'll make your life easier too. This tool is named "bob", and is available here: <a href="https://github.com/varnish/toolbox/tree/master/bob">https://github.com/varnish/toolbox/tree/master/bob</a></div><div><br></div><div>The short of it is that on compatible repositories, if you have bob and docker installed, you can start building without worrying about dependencies. For varnish, you can just go:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace">bob ./autogen.des</font></div><div><font face="monospace">bob make</font></div><div><font face="monospace">bob make check</font></div></blockquote><div><br></div><div>And things should just work, the files are created by the container in your work directory, with the right owner and permissions, but without you having to install anything extra. And that allows you to code from your host machine with the IDE of your choice, and to rely on bob only for the compilation steps.</div><div><br></div><div>Internally, bob just:</div><div>- grabs a a Dockerfile in the .circleci/ directory and builds the corresponding image</div><div>- creates a container user with the same UID/GID that is running on the host</div><div>- mounts your home as the container's home</div><div>- run a command</div><div>- destroy the container</div><div><br></div><div>The goal here is to provide a frictionless start to new users so they can get cracking faster, but also to allow testing on other platforms. For example, you can set the BOB_DIST env variable to run other containers:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><font face="monospace">BOB_DIST=ubuntu bob ./autogen.des</font></div></div><div><div><font face="monospace">BOB_DIST=ubuntu bob make</font></div></div><div><div><font face="monospace">BOB_DIST=ubuntu bob make check</font></div></div></blockquote><div><font face="monospace"><br></font></div><div><font face="arial, sans-serif">This can prove very useful to test different environments (cf. new compiler version issues)</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">If you want to recreate the image (which includes a "docker pull"), just run it without arguments:</font></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace">bob</font></div></blockquote><font face="arial, sans-serif">If you need to get into the container to run a couple of commands:</font><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace">bob bash</font></div></blockquote><div><br></div><div>I've just pushed the necessary Dockerfiles to enable it on:</div><div>- <a href="https://github.com/varnishcache/varnish-cache">https://github.com/varnishcache/varnish-cache</a> (centos by default, and BOB_DIST support for ubuntu, archlinux and alpine)</div><div>- <a href="https://github.com/varnish/varnish-modules">https://github.com/varnish/varnish-modules</a> (centos only)</div><div>- <a href="https://github.com/varnish/hitch/">https://github.com/varnish/hitch/</a> (centos by default, and BOB_DIST support for ubuntu, archlinux and alpine)</div><div><br></div><div>So those are ready to go, but the tool is meant to be generic and should work with pretty much any repo as long as you create a Dockerfile for it in bob/, .bob/, .circleci/ or .github.</div><div><br></div><div><div>Of course, this is completely optional, and if you don't care about it, this should be completely invisible to you. However, if you do find it useful, or PRs and bug trackers are open, I'm eager to get more feedback about it.</div></div><div><br></div><div>Cheers!</div><div><br></div><div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div>Guillaume Quintard<br></div></div></div></div></div></div>