-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathDockerfile
29 lines (21 loc) · 1.05 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
ARG ALPINE_IMAGE_TAG=3.14
ARG LINKDING_IMAGE_TAG=latest
FROM docker.io/alpine:$ALPINE_IMAGE_TAG as builder
ARG LITESTREAM_VERSION=v0.3.11
# Download the static build of Litestream directly into the path & make it executable.
# This is done in the builder and copied as the chmod doubles the size.
ADD https://github.com/benbjohnson/litestream/releases/download/$LITESTREAM_VERSION/litestream-$LITESTREAM_VERSION-linux-amd64.tar.gz /tmp/litestream.tar.gz
RUN tar -C /usr/local/bin -xzf /tmp/litestream.tar.gz
# Pull linkding docker image.
FROM docker.io/sissbruecker/linkding:$LINKDING_IMAGE_TAG
# Copy Litestream from builder.
COPY --from=builder /usr/local/bin/litestream /usr/local/bin/litestream
# Copy Litestream configuration file.
COPY etc/litestream.yml /etc/litestream.yml
# Copy custom uwsgi. This allows to run with 256MB RAM.
COPY uwsgi.ini /etc/linkding/uwsgi.ini
# Copy startup script and make it executable.
COPY scripts/run.sh /scripts/run.sh
RUN chmod +x /scripts/run.sh
# Litestream spawns linkding's webserver as subprocess.
CMD ["/scripts/run.sh"]