try pijul with docker - 04-01-19

Apparently pijul is the nerd’s nerd version control so natrally I had to try it out. I was attracted by the associative nature of the patches and the more pure implmentation of patch theory then the likes of git. Not wanting to install rust on my mac I came up with this docker workflow. I think the concept carries into trying many things out locally from dev tools to server side applications.

Inital Pijul docker setup

This is how I inatilly got pinjul up and running aka without Dockerfile. Read on for quicker setup.

  1. Create and run a rust docker container volume binding your working dir $ docker run -it -v “$(pwd)”:/src –network host –name=rust1 rust:latest /bin/bash this will automatically put you in that continers shell. to relaunch the container again after you exit you will need a different command: $ docker run -it -v “$(pwd)”:/src –network host –name=rust1 xyzContinerHashxyz /bin/bash
  2. Then once inside the container install pijul with:
    1. $ apt-get install libsodium-dev
    2. $ cargo install pijul –force
  3. Now you can start using it $ cd /src && pijul init

Faster Pijul docker setup

Once the above steps have been figured out it’s faster to create a docker file for pijul so you can take it with you to other systems.

Example Dockerfile


FROM rust:latest
RUN apt-get update
RUN apt-get install -y libsodium-dev
RUN cargo install pijul –force

1. Copy the example file above and create your own Dockerfile $ pbpaste > Dockerfile 1. Build the container $ docker build . -t username/local-pijul:latest 1. Run the new container with $ docker run -it -v “$(pwd)”:/src –network host –name=pijul local-pijul:latest /bin/bash

Docs are pretty sparce at time of writing and beside: $ pijul help there a few links I came a cross that were critical:

Conclusion

I used pijul for about a week on one of my personal projects. I found it quite intuitive and seeing the patch theory in action was fun but I was not without faults. I especially like the decentralization of its workflow compared to a single master repo we end up with using Git. In the end though the amazing infrastructure around git like Gitlab-CI and the ease of use / extensive documentation made me shift back to git.

tags: [tech]