Repository navigation
Expand file tree
/
Copy pathContainerfile
More file actions
55 lines (46 loc) · 2.29 KB
/
Copy pathContainerfile
File metadata and controls
55 lines (46 loc) · 2.29 KB
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
45
46
47
48
49
50
51
52
53
54
55
# --------------------------------------------------------------------------
# THIS FILE IS AUTOGENERATED - DO NOT EDIT MANUALLY
#
# Source: Containerfile.j2
# --------------------------------------------------------------------------
ARG BASE_VERSION=15.1
FROM ghcr.io/daemonless/base-exec:${BASE_VERSION}
ARG FREEBSD_ARCH=amd64
ARG UPSTREAM_URL="https://api.github.com/repos/seaweedfs/seaweedfs/releases/latest"
ARG UPSTREAM_JQ=".tag_name"
ARG HEALTHCHECK_ENDPOINT="http://localhost:9333/cluster/healthz"
ENV HEALTHCHECK_URL="${HEALTHCHECK_ENDPOINT}"
LABEL org.opencontainers.image.title="SeaweedFS" \
org.opencontainers.image.description="SeaweedFS is a fast distributed storage system for blobs, objects, files, and a data lake, scaling to billions of files. It provides an S3 API, POSIX FUSE mount, WebDAV, and a Filer with cross-cluster active-active replication." \
org.opencontainers.image.source="https://github.com/daemonless/seaweedfs" \
org.opencontainers.image.url="https://seaweedfs.com/" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.vendor="daemonless" \
org.opencontainers.image.authors="daemonless" \
io.daemonless.category="Network" \
io.daemonless.port="8333" \
io.daemonless.arch="${FREEBSD_ARCH}" \
io.daemonless.upstream-url="${UPSTREAM_URL}" \
io.daemonless.upstream-jq="${UPSTREAM_JQ}" \
io.daemonless.healthcheck-url="${HEALTHCHECK_ENDPOINT}"
# Download the official FreeBSD `weed` binary for this release
RUN VERSION=$(fetch -qo - "${UPSTREAM_URL}" | jq -r "${UPSTREAM_JQ}") && \
case "${FREEBSD_ARCH}" in \
amd64) SWARCH=freebsd_amd64 ;; \
arm64|aarch64) SWARCH=freebsd_arm64 ;; \
*) echo "unsupported arch: ${FREEBSD_ARCH}" >&2; exit 1 ;; \
esac && \
fetch -qo /tmp/weed.tar.gz \
"https://github.com/seaweedfs/seaweedfs/releases/download/${VERSION}/${SWARCH}.tar.gz" && \
tar -xzf /tmp/weed.tar.gz -C /usr/local/bin weed && \
chmod +x /usr/local/bin/weed && \
rm /tmp/weed.tar.gz && \
mkdir -p /app && \
echo "${VERSION}" > /app/version
# Copy root filesystem
COPY root/ /
RUN chmod +x /daemonless/libexec/seaweedfs /daemonless/init.d/*
CMD ["/daemonless/libexec/seaweedfs"]
RUN chmod +x /healthz
EXPOSE 8333 9333 8888 8080
VOLUME ["/config", "/data"]