From 3d0d2ea6bbbb272f5163c909ddb60b23ec19c721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Mon, 29 May 2017 18:50:35 +0200 Subject: [PATCH] Document that there is a choice in using containers, and what the trade-off is --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d5db637..40fcf93f 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,14 @@ Building - To build the `skopeo` binary you need at least Go 1.5 because it uses the latest `GO15VENDOREXPERIMENT` flag. +There are two ways to build skopeo: in a container, or locally without a container. Choose the one which better matches your needs and environment. + ### Building without a container +Building without a container requires a bit more manual work and setup in your environment, but it is more flexible: +- It should work in more environments (e.g. for native macOS builds) +- It does not require root privileges (after dependencies are installed) +- It is faster, therefore more convenient for developing `skopeo`. + Make sure to clone the repository in your `GOPATH` - otherwise compilation fails. ```sh @@ -125,7 +132,10 @@ $ sudo dnf install gpgme-devel libassuan-devel btrfs-progs-devel device-mapper-d ``` ### Building in a container -If your system has a `docker` command and can run Linux containers, +Building in a container is simpler, but more restrictive: +- It requires the `docker` command and the ability to run Linux containers +- The created executable is a Linux executable, and depends on dynamic libraries which may only be available only in a container of a similar Linux distribution. + ```sh $ make binary # Or (make all) to also build documentation, see below. ```