From 5574696564102a650a7cd91f79cd4a0410bf6b93 Mon Sep 17 00:00:00 2001 From: Dominic Breuker Date: Thu, 5 Apr 2018 09:01:27 +0200 Subject: [PATCH] switch to debian for build image to link against libc --- README.md | 13 +++++++++---- docker/Dockerfile.build | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bee93fa..5f135e1 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,15 @@ Inotify watchers placed on selected parts of the file system trigger these scans ## Getting started Get the tool onto the Linux machine you want to inspect. -You must choose between the 32 and 64 bit versions. -The files are (for now) in the `/bin` folder of this repository. -- 32 bit version: [download](bin/pspy32) -- 64 bit version: [download](bin/pspy64) +First get the binaries. + +You can build them yourself by running `make build-build-image` to build a docker image used in `make build` to build four binaries: +- 32 bit big, static version: `pspy32` +- 64 bit big, static version: `pspy64` +- 32 bit small version: `pspy32s` +- 64 bit small version: `pspy64s` +The statically compiled files should work on any Linux system but are quite huge (~4MB). +If size is an issue, try the smaller versions which depend on libc and are compressed with UPX (<1MB). You can run `pspy --help` to learn about the flags and their meaning. The summary is as follows: diff --git a/docker/Dockerfile.build b/docker/Dockerfile.build index 0f7988a..9917f9f 100644 --- a/docker/Dockerfile.build +++ b/docker/Dockerfile.build @@ -1,3 +1,3 @@ -FROM golang:1.10-alpine +FROM golang:1.10-stretch -RUN apk add upx --no-cache +RUN apt-get update && apt-get install -y upx && rm -rf /var/lib/apt/lists/*