1. 12
  1.  

  2. 9

    I decided to create a docker image that contains Zola. So, I now have a portable means to generate the site.

    As far as I remember, Zola provides official static binaries. In that light it looks like a classic case of dockeritis to me. ;)

    1. 6

      Sadly this is not really the case. They are binaries but they are not static and this has actually bitten me when I tried to run Zola on Centos 7. Relevant issue is here. It boils down to needing the C-based sassc compiler. Native sass compilers are in the works and coming along nicely but they are not quite there yet.

      For the time being, using Docker for this case is not so misled after all.

      1. 1

        ugh, sass tends to be the most annoying dependency, it’s also a big pain for the rust-Lang website

        1. 1

          Oh, I see. Yeah, “compile against the oldest glibc you want to support” is a hit and miss approach for sure. Until a truly static binary is made, a container makes sense.

        2. 1

          Hey, thanks for this comment. I hadn’t even realized that there are binaries of Zola available. You are probably right, for my current use case I could just use one of the binaries.

          However, I think I still prefer my container-ized solution for a couple reasons:

          1. In general, I prefer to build (non-os layer) things from source
          2. I don’t think I made this super clear in the blog post: In the future, I intend to replace the “pre-push” hook with a CD system that will automatically build and publish the site for every commit. The CD system I intend to use will require running a container. So, it makes sense to match my development environment with the CD environment.
        3. 2

          Have you thought about using Netlify? It basically builds and publish the site for you, or even set up a CDN, file compression/aggregation. With a .netlify.toml in your repo you can set up zola version and build command, integrating directly with GitHub.

          I’ve been using it for a few months, although recently I’ve been moving my services to my vps and will probably end up just writing a server side git hook to handle this process there.

          1. 1

            Haven’t heard of Netlify before – I’ll check it out.