mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-08-03 18:05:58 -04:00
Simpler static build
Use an ubuntu image to obtain a static libfuse without compiling. Remove the need for sharing /dev/fuse with the build container. Simpler build instructions.
This commit is contained in:
parent
f6cbfc6489
commit
d6f7ae40b6
11
Dockerfile.simpler
Normal file
11
Dockerfile.simpler
Normal file
@ -0,0 +1,11 @@
|
||||
FROM docker.io/ubuntu:rolling
|
||||
WORKDIR /build
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends -y \
|
||||
libc6-dev gcc g++ make automake autoconf clang pkgconf libfuse3-dev
|
||||
|
||||
RUN cd fuse-overlayfs && \
|
||||
sh autogen.sh && \
|
||||
LIBS="-ldl" LDFLAGS="-static" ./configure --prefix /usr && \
|
||||
make
|
||||
|
11
README.md
11
README.md
@ -47,19 +47,12 @@ the install script will usually create the device automatically; or
|
||||
|
||||
4. Launch the build with the command (note the single dot `.` at the end):
|
||||
```
|
||||
buildah bud --device /dev/fuse -t fuse-overlayfs -f ./Dockerfile.static .
|
||||
buildah bud -v $PWD:/build/fuse-overlayfs -t fuse-overlayfs -f ./Dockerfile.simpler .
|
||||
```
|
||||
|
||||
5. Copy the resulting binary to your host:
|
||||
|
||||
* if you have `podman` installed:
|
||||
```
|
||||
podman run --rm --entrypoint="[]" fuse-overlayfs cat /usr/bin/fuse-overlayfs | sudo tee /usr/bin/fuse-overlayfs > /dev/null
|
||||
```
|
||||
* or, if you only have `buildah` installed:
|
||||
```
|
||||
container="$(buildah from fuse-overlayfs)"
|
||||
buildah run "$container" cat /usr/bin/fuse-overlayfs | sudo tee /usr/bin/fuse-overlayfs > /dev/null
|
||||
buildah rm "$container"
|
||||
sudo cp fuse-overlayfs /usr/bin/
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user