1. 24
  1.  

  2. 8

    Sort of an aside discussion, but the author’s choice to distribute the code as a Docker image: is that becoming a thing now?

    I’m notorious among my peers for installing and trying everything under the sun, and usually having to blow out and reinstall my computer about once a year (usually coinciding with Apple’s release of an updated MacOS). Maybe I’m late to the party, but Docker images are a much cleaner way of distributing projects in a working environment, are they not?

    1. 13

      This feels like the kind of thing I’d be grumpy about if I were any older; software distribution is one of our oldest and therefore most-studied problems. Java tried to solve it with a universal runtime. Package managers try to solve it with an army of maintainers who manage dependencies. Giving up on all that and bundling the entirety of latex and all its dependencies (one of the intermediate images is 3 point 23 fucking gigs!) just to distribute a 279 line style file and make it easier to use feels… kind of excessive?

      That said, I’m not old and grumpy and this is awesome. I kind of hope that this becomes a thing, it’s easy to install and easy to remove (and know that you’ve left no traces on your system) and this image will presumably be usable for a very long time.

      EDIT: I wrote the above comment while I was waiting for the image to finish downloading. It’s now finished and the final image takes up 5.63GB of my disk space. I don’t mind for this one-off package but would certainly mind if this method of distribution started catching on. Maybe we should just all use nix?

      1. 3

        I wrote the above comment while I was waiting for the image to finish downloading. It’s now finished and the final image takes up 5.63GB of my disk space. I don’t mind for this one-off package but would certainly mind if this method of distribution started catching on. Maybe we should just all use nix?

        Docker has some mechanisms for sharing significant parts of those images… at least if they’re created from the same base. The problem obviously is that people are free to do whatever, so that sharing is far from optimal.

        1. 1

          Agreed, I assumed this was going to be something like a 200 python script with maybe 2 or 3 dependencies.

        2. 4

          A docker image is the new curl|sh install method.

          Basically ignore any concerns about security, updates, ‘I want this shit now Ma.’

          1. 4

            A random docker image is less likely to fuck up your home dir, though.

            1. 2

              I’ve spent a lot more time working with the shell than Docker. I find this Docker image a lot easier to understand and verify than various things I’ve been told to curl | sh.

              1. 1

                Couldn’t you just download and verify a script with curl -o filename.sh http://domain.name/filename.sh? How does a random Docker image end up being easier to verify? With a script you can just read through it, and verify what it does. With a Docker image you basically have to trust an image from 2014 of an entire operating system.

                This honestly looks like one of the worst candidates for a Docker image. You have a tiny plaintext file which is all this is installing, and you are being told to download a multi gigabyte blob. I can understand why some people recommend using Docker for development, and running things and places you might not have control of the entire system, it here just seems unnecessary here.

                1. 1

                  I don’t see how it’s installing just a style. It’s installing TeX, which is a big hairy package.

                  When I pull down the install for rustup, I end up with a 360 line shell script, which isn’t super easy to verify. For haskell’s stack, it’s 720. I swear I’ve seen 1500 before.

              2. 1

                Agree re security (you could get hacked) but at least it won’t accidentally wipe your hard drive while trying to uninstall (as has happened a few timed I’m aware of).

              3. 3

                In this case especially, as the instructions to install and configure are pretty painful:

                https://github.com/Jubobs/gitdags

                Oh, there are none. But there is this:

                http://chrisfreeman.github.io/gitdags_install.html

                As an aside, the Docker image has a couple of features I’m quite proud of (in a small way).

                1. The default command of the container outputs help text.

                2. If the convert_images.sh script spots a Makefile, it runs it, eg:

                https://github.com/ianmiell/gitdags/blob/master/examples/Makefile

                which reduces build time significantly if you have a lot of images.

                1. 4

                  Just scrolling through that second link gives me anxiety; oh my god this is going to go wrong in fifty different ways. Getting it all together in a configured package (docker image) was pretty smart.

                  1. 3

                    I don’t know… Looking at the second link, the install instructions are actually fairly simple if you have TeX and the dependencies installed. Even if you don’t, like it’s just a LaTeX distribution, the tikz package, and the xcolor-solarized package.

                    In which case the instructions are only:

                    $ cd ${LATEX_ROOT}/texmf/tex/latex && git clone https://github.com/Jubobs/gitdags.git
                    $ kpsewhich gitdags.sty   # Check to see if gitdags.sty can be seen by TeX
                    

                    I feel like an entire Docker container is a little overkill. Might be an OK way to try the software, especially if you don’t have a TeX distribution installed, but it wouldn’t be a good way to actually use it.

                    1. 1

                      From the link:

                      ‘First, do NOT use apt-get to install. The best is to install TexLive from the Tex Users Groug (TUG).’

                      1. 1

                        Yeah like I said, the instructions are fairly simple if you have a TeX distribution Installed. If that version does happened to be from a distribution, I’m sure it works anyways - he did say the best way.

                        If you don’t happen to have TeX installed, it’s not that complicated to install it from manually from TUG anyways.

                      2. 1

                        Looking at the second link, the install instructions are actually fairly simple if you have TeX and the dependencies installed

                        Yeah, I already have TeX on my system, so I don’t really see what the problem is.

                      3. 1

                        The default command of the container outputs help text.

                        I haven’t seen that before; for a “packaging” container (rather than an “app deployment” container) it’s a nice touch I’ll be copying, thanks :-)

                      4. 2

                        I’ve used this very package with nix on OS X, I think a docker image is… a bit over the top personally. It wasn’t that bad to install and setup compared to any other latex package.

                      5. 6

                        Isn’t good old graphviz a perfectly good tool for producing git diagrams.

                        1. 2

                          Quite probably - I’ve used that too quite a bit - https://zwischenzugs.com/2017/12/18/project-management-as-code-with-graphviz/ - have you done this before/seen this written up?