From d73490709bfcd317d3d4808992b7bc8c93caa647 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 31 Jul 2018 10:49:39 -0400 Subject: [PATCH] *: some build hints and static link example Signed-off-by: Vincent Batts --- Dockerfile.static | 21 +++++++++++++++++++++ README.md | 14 ++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 Dockerfile.static diff --git a/Dockerfile.static b/Dockerfile.static new file mode 100644 index 0000000..ce916ff --- /dev/null +++ b/Dockerfile.static @@ -0,0 +1,21 @@ +FROM fedora:latest +WORKDIR /build +RUN dnf update -y && \ + dnf install -y git make automake autoconf gcc glibc-static meson ninja-build + +RUN git clone https://github.com/libfuse/libfuse && \ + cd libfuse && \ + mkdir build && \ + cd build && \ + LDFLAGS="-lpthread" meson --prefix /usr -D default_library=static .. && \ + ninja && \ + ninja install + +RUN git clone https://github.com/containers/fuse-overlayfs && \ + cd fuse-overlayfs && \ + sh autogen.sh && \ + LIBS="-ldl" LDFLAGS="-static" ./configure --prefix /usr && \ + make && \ + make install + +ENTRYPOINT ["/usr/bin/fuse-overlayfs"] diff --git a/README.md b/README.md index d04dc2b..9f3bab3 100644 --- a/README.md +++ b/README.md @@ -21,3 +21,17 @@ Specify a different UID/GID mapping: ``` $ fuse-overlayfs -o uidmapping=0:10:100:100:10000:2000,gidmapping=0:10:100:100:10000:2000,lowerdir=lowerdir/a:lowerdir/b,upperdir=up,workdir=workdir merged ``` + +Build Requirements: +======================================================= + +This links to libfuse > v3 + +On fedora: `dnf install fuse3-devel` + + +Static Build: +======================================================= + +`buildah bud -t ./Dockerfile.static .` +