Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.15 KB

osx_install.md

File metadata and controls

40 lines (29 loc) · 1.15 KB

First make sure that go is installed:

brew install go
mkdir $HOME/.go
export GOPATH=$HOME/.go
export PATH=$PATH:$GOPATH/bin

Clone (not download) the repository:

git clone https://github.com/jwilder/docker-squash.git

Install the units package:

go get github.com/docker/go-units

Build the binary:

brew install gnu-tar
GOBIN=$(pwd) make

Now you should have a docker-squash executable in the current folder. Only one step missing to run it correctly:

Install GNU tar (you could also patch utils.go(in extractTar the --xattrs attribute is not supported in osx) but this seems easier to do)

brew install gnu-tar
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"

You can copy the docker-squash executable to whatever folder you are working on or put in in some place in your path (one of the many bin folders) If you close the terminal and want to use it again in the future don't forget to run again all the exports commands, so that the environment variabels are correctly set. If you are using the same executable (not building again) then the only important export would be the last one (for GNU tar).