-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
30 lines (21 loc) · 904 Bytes
/
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
FROM alpine:latest
# NOTE: because of these args, if you want to build this manually you've to add
# e.g. --build-arg TARGETARCH=amd64 to $ docker build ...
# "amd64" | "arm" | ...
ARG TARGETARCH
# usually empty. for "linux/arm/v7" => "v7"
ARG TARGETVARIANT
WORKDIR /varasto
# stores Varasto state (files' metadata)
VOLUME /varasto-db
ENTRYPOINT ["sto"]
CMD ["server"]
# symlink /root/varastoclient-config.json to /varasto-db/.. because it's stateful.
# this config is used for server subsystems (thumbnailing, FUSE projector) to communicate
# with the server.
RUN mkdir -p /varasto /root/.config/varasto \
&& ln -s /varasto/sto /bin/sto \
&& ln -s /varasto-db/client-config.json /root/.config/varasto/client-config.json \
&& apk add --update smartmontools fuse \
&& echo '{"db_location": "/varasto-db/varasto.db"}' > /varasto/config.json
COPY "rel/sto_linux-$TARGETARCH" /varasto/sto