Creating unison binaries using docker

Nicholas Alipaz

I wanted to create my own binaries of Unison File Synchronizer on Debian Jessie instead of using the ones from the repos. Rather than muck up my machine with things like build-essential, ocaml, headers, and such I decided to compile it in a Docker guest machine. Here are the steps I used to do it.

docker run --name debian_jessie -it debian:stable /bin/bash apt-get update apt-get -y install ocaml liblablgtk2-ocaml-dev build-essential linux-headers-$(uname -r) exuberant-ctags mkdir unison cd unison curl -LO tar -zxvf unison-2.48.4.tar.gz cd src/ make mv unison unison-gtk make clean make UISTYLE=text mv unison unison-text mv unison-gtk unison exit sudo docker cp debian_jessie:/unison/src/unison /usr/local/bin/ sudo docker cp debian_jessie:/unison/src/unison-text /usr/local/bin/ docker rm debian_jessie docker rmi debian:stable