forked from data-exp-lab/girderfs
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
44 lines (41 loc) · 1.28 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM python:3.10-slim-bullseye
COPY ./passthrough.c /tmp/dumbthrough.c
RUN apt -qqy update \
&& apt install --no-install-recommends -qqy \
fuse3 \
davfs2 \
libfuse2 \
libcurl4 \
libjansson4 \
tini \
sudo \
&& apt install --no-install-recommends -qqy \
libjansson-dev \
libfuse3-dev \
libcurl4-openssl-dev \
git \
pkg-config \
build-essential \
&& git clone https://github.com/data-exp-lab/girderfs_passthrough.git /tmp/passthrough \
&& cd /tmp/passthrough \
&& make \
&& make install \
&& gcc -o /usr/local/bin/dumbthrough-fuse -O2 -g -Wall `pkg-config --cflags fuse3` /tmp/dumbthrough.c `pkg-config --libs fuse3` \
&& cd / \
&& rm -rf /tmp/passthrough \
&& apt remove -qqy \
libjansson-dev \
libcurl4-openssl-dev \
git \
pkg-config \
build-essential \
&& apt autoremove -qqy \
&& apt -qqy clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& echo "user_allow_other" >> /etc/fuse.conf \
&& ln -s /proc/self/mounts /etc/mtab \
&& useradd -u 1000 -g 100 --no-log-init -s /bin/bash -p $(openssl rand -base64 32) -m -r wtuser
COPY . /app
WORKDIR /app
RUN pip install --no-cache-dir . && pip install tornado jsonschema psutil --no-cache-dir
ENTRYPOINT ["/usr/bin/tini", "--", "girderfs-server"]