|
| 1 | +# Build arguments for metadata |
| 2 | +ARG VERSION="latest" |
| 3 | +ARG BUILD_DATE |
| 4 | +ARG VCS_REF |
| 5 | + |
| 6 | +# Stage 1: Get Litestream binary |
1 | 7 | FROM litestream/litestream:0.3 AS builder |
2 | 8 |
|
| 9 | +# Stage 2: Main image based on Linkding |
3 | 10 | FROM sissbruecker/linkding:latest |
4 | 11 |
|
5 | | -# Install Litestream |
| 12 | +# OCI standard labels |
| 13 | +# See: https://github.com/opencontainers/image-spec/blob/main/annotations.md |
| 14 | +LABEL org.opencontainers.image.title="Linkding with Litestream" \ |
| 15 | + org.opencontainers.image.description="Self-hosted bookmark manager (Linkding) with automated SQLite backup to S3 using Litestream" \ |
| 16 | + org.opencontainers.image.url="https://github.com/zhaochunqi/linkding-deployment" \ |
| 17 | + org.opencontainers.image.source="https://github.com/zhaochunqi/linkding-deployment" \ |
| 18 | + org.opencontainers.image.version="${VERSION}" \ |
| 19 | + org.opencontainers.image.created="${BUILD_DATE}" \ |
| 20 | + org.opencontainers.image.revision="${VCS_REF}" \ |
| 21 | + org.opencontainers.image.licenses="MIT" \ |
| 22 | + org.opencontainers.image.vendor="zhaochunqi" \ |
| 23 | + org.opencontainers.image.authors="zhaochunqi" \ |
| 24 | + org.opencontainers.image.documentation="https://github.com/zhaochunqi/linkding-deployment/blob/main/README.md" |
| 25 | + |
| 26 | +# Legacy labels for compatibility |
| 27 | +LABEL maintainer="zhaochunqi" \ |
| 28 | + org.label-schema.schema-version="1.0" \ |
| 29 | + org.label-schema.name="Linkding with Litestream" \ |
| 30 | + org.label-schema.description="Self-hosted bookmark manager with S3 backup" \ |
| 31 | + org.label-schema.url="https://github.com/zhaochunqi/linkding-deployment" \ |
| 32 | + org.label-schema.vcs-url="https://github.com/zhaochunqi/linkding-deployment" \ |
| 33 | + org.label-schema.version="${VERSION}" \ |
| 34 | + org.label-schema.build-date="${BUILD_DATE}" \ |
| 35 | + org.label-schema.vcs-ref="${VCS_REF}" |
| 36 | + |
| 37 | +# Install Litestream binary from builder stage |
6 | 38 | COPY --from=builder /usr/local/bin/litestream /usr/local/bin/litestream |
7 | 39 |
|
8 | | -# Copy configuration and entrypoint |
| 40 | +# Copy Litestream configuration and custom entrypoint |
9 | 41 | COPY litestream.yml /etc/litestream.yml |
10 | 42 | COPY entrypoint.sh /entrypoint.sh |
11 | 43 | RUN chmod +x /entrypoint.sh |
12 | 44 |
|
| 45 | +# Use custom entrypoint that handles database restore and replication |
13 | 46 | ENTRYPOINT ["/entrypoint.sh"] |
0 commit comments