*: some build hints and static link example

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2018-07-31 10:49:39 -04:00 committed by Giuseppe Scrivano
parent 79c70fd91a
commit d73490709b
2 changed files with 35 additions and 0 deletions

21
Dockerfile.static Normal file
View File

@ -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"]

View File

@ -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 .`