1
0
mirror of https://github.com/falk-werner/webfuse-example synced 2024-10-27 20:44:09 +00:00

updated to webfused 0.2.0

This commit is contained in:
Falk Werner 2020-03-20 17:47:18 +01:00
parent e3344ba461
commit dcd8eddeb2
3 changed files with 35 additions and 5 deletions

View File

@ -15,7 +15,9 @@ RUN set -x \
openssl \
libssl-dev \
uuid-dev \
wget
wget \
libconfig-dev \
libpam0g-dev
COPY www /var/www
@ -106,7 +108,7 @@ RUN set -x \
&& make "$PARALLELMFLAGS" install \
&& rm -rf "$builddir"
ARG WEBFUSED_VERSION=0.1.0
ARG WEBFUSED_VERSION=0.2.0
RUN set -x \
&& builddir="/tmp/out" \
&& mkdir -p "$builddir" \
@ -116,10 +118,16 @@ RUN set -x \
&& cd "webfused-$WEBFUSED_VERSION" \
&& mkdir .build \
&& cd .build \
&& cmake ".." \
&& cmake -DWITHOUT_TESTS=ON ".." \
&& make "$PARALLELMFLAGS" install \
&& rm -rf "$builddir"
COPY webfused.conf /etc
ARG USERID=1000
RUN set -x \
&& useradd -u "$USERID" -ms /bin/bash user
EXPOSE 8080
ENTRYPOINT ["dumb-init", "--"]

View File

@ -11,12 +11,13 @@ Example of webfuse.
docker run -p 8080:8080 --rm -it \
--device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined \
--user `id -u` \
webfuse bash
webfused -m /tmp -d /var/www -p 8080
webfused -f /etc/webfused.conf
Open a webbrowser and visit http://localhost:8080 and follow the instruction on the screen.
Then open another terminal and connect to the container.
docker exec -it <name of container> bash
cat /tmp/test/default/hello.txt
cat /tmp/test/hello.txt

21
webfused.conf Normal file
View File

@ -0,0 +1,21 @@
# Webfuse deamon configuration file
version = { major = 1, minor = 0 }
server:
{
vhost_name = "localhost"
port = 8080
document_root = "/var/www"
}
filesystems:
(
{name = "test", mount_point = "/tmp/test" }
)
log:
{
provider: "stderr"
level: "all"
}