2020-06-30 21:27:10 +00:00
FROM alpine
2016-09-08 07:19:06 +00:00
2021-04-19 04:46:03 +00:00
# 'latest' or 'dev'
ARG RELEASE = latest
2021-02-18 20:23:26 +00:00
2020-06-30 21:27:10 +00:00
RUN \
ARCH = $( if [ $( uname -m) = = "x86_64" ] && [ $( getconf LONG_BIT) = = "64" ] ; then echo "amd64" ; \
elif [ $( uname -m) = = "x86_64" ] && [ $( getconf LONG_BIT) = = "32" ] ; then echo "386" ; \
elif [ $( uname -m) = = "aarch64" ] ; then echo "arm64" ; \
elif [ $( uname -m) = = "armv7l" ] ; then echo "arm" ; \
2021-08-28 01:53:24 +00:00
elif [ $( uname -m) = = "armv6l" ] ; then echo "arm" ; \
elif [ $( uname -m) = = "s390x" ] ; then echo "s390x" ; \
elif [ $( uname -m) = = "ppc64le" ] ; then echo "ppc64le" ; fi ; ) && \
2020-06-30 21:27:10 +00:00
echo " Building for $ARCH " 1>& 2 && \
SUPERCRONIC_SHA1SUM = $( echo $ARCH | sed 's/386/e0126b0102b9f388ecd55714358e3ad60d0cebdb/g' | sed 's/amd64/5ddf8ea26b56d4a7ff6faecdd8966610d5cb9d85/g' | sed 's/arm64/e2714c43e7781bf1579c85aa61259245f56dbba1/g' | sed 's/arm/47481c3341bc3a1ae91a728e0cc63c8e6d3791ad/g' ) && \
2020-06-30 20:22:29 +00:00
SUPERCRONIC_URL = https://github.com/aptible/supercronic/releases/download/v0.1.9/supercronic-linux-$ARCH && \
SUPERCRONIC = supercronic-linux-$ARCH && \
# Install SeaweedFS and Supercronic ( for cron job mode )
apk add --no-cache --virtual build-dependencies --update wget curl ca-certificates && \
2020-12-21 05:48:35 +00:00
apk add fuse && \
2021-08-17 01:47:42 +00:00
wget -P /tmp https://github.com/$( curl -s -L https://github.com/chrislusf/seaweedfs/releases/${ RELEASE } | egrep -o " chrislusf/seaweedfs/releases/download/.*/linux_ $ARCH .tar.gz " | head -n 1) && \
2020-06-30 20:22:29 +00:00
tar -C /usr/bin/ -xzvf /tmp/linux_$ARCH .tar.gz && \
2020-01-25 16:17:59 +00:00
curl -fsSLO " $SUPERCRONIC_URL " && \
echo " ${ SUPERCRONIC_SHA1SUM } ${ SUPERCRONIC } " | sha1sum -c - && \
chmod +x " $SUPERCRONIC " && \
mv " $SUPERCRONIC " " /usr/local/bin/ ${ SUPERCRONIC } " && \
ln -s " /usr/local/bin/ ${ SUPERCRONIC } " /usr/local/bin/supercronic && \
apk del build-dependencies && \
rm -rf /tmp/*
2016-09-08 07:19:06 +00:00
2018-10-11 08:16:33 +00:00
# volume server gprc port
EXPOSE 18080
# volume server http port
2016-09-08 07:19:06 +00:00
EXPOSE 8080
2018-10-11 08:16:33 +00:00
# filer server gprc port
EXPOSE 18888
# filer server http port
2018-09-11 19:36:59 +00:00
EXPOSE 8888
2019-01-18 22:32:02 +00:00
# master server shared gprc port
EXPOSE 19333
# master server shared http port
2016-09-08 07:19:06 +00:00
EXPOSE 9333
2018-12-16 23:40:52 +00:00
# s3 server http port
EXPOSE 8333
2021-02-01 06:57:30 +00:00
# webdav server http port
EXPOSE 7333
2016-09-08 07:19:06 +00:00
2019-06-30 07:44:57 +00:00
RUN mkdir -p /data/filerldb2
2019-03-15 07:32:42 +00:00
2016-09-08 07:19:06 +00:00
VOLUME /data
2021-11-13 01:21:49 +00:00
WORKDIR /data
2016-09-08 07:19:06 +00:00
2020-01-25 16:17:59 +00:00
COPY filer.toml /etc/seaweedfs/filer.toml
COPY entrypoint.sh /entrypoint.sh
2016-10-12 10:10:38 +00:00
RUN chmod +x /entrypoint.sh
2016-09-08 07:19:06 +00:00
ENTRYPOINT [ "/entrypoint.sh" ]