2020-07-01 05:27:10 +08:00
FROM alpine
2016-09-08 15:19:06 +08:00
2021-04-19 12:46:03 +08:00
# 'latest' or 'dev'
ARG RELEASE = latest
2021-02-19 04:23:26 +08:00
2020-07-01 05:27:10 +08: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" ; \
elif [ $( uname -m) = = "armv6l" ] ; then echo "arm" ; fi ; ) && \
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-07-01 04:22:29 +08: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 13:48:35 +08:00
apk add fuse && \
2021-08-17 09:47:42 +08: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-07-01 04:22:29 +08:00
tar -C /usr/bin/ -xzvf /tmp/linux_$ARCH .tar.gz && \
2020-01-26 00:17:59 +08: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 15:19:06 +08:00
2018-10-11 16:16:33 +08:00
# volume server gprc port
EXPOSE 18080
# volume server http port
2016-09-08 15:19:06 +08:00
EXPOSE 8080
2018-10-11 16:16:33 +08:00
# filer server gprc port
EXPOSE 18888
# filer server http port
2018-09-12 03:36:59 +08:00
EXPOSE 8888
2019-01-19 06:32:02 +08:00
# master server shared gprc port
EXPOSE 19333
# master server shared http port
2016-09-08 15:19:06 +08:00
EXPOSE 9333
2018-12-17 07:40:52 +08:00
# s3 server http port
EXPOSE 8333
2021-02-01 14:57:30 +08:00
# webdav server http port
EXPOSE 7333
2016-09-08 15:19:06 +08:00
2019-06-30 15:44:57 +08:00
RUN mkdir -p /data/filerldb2
2019-03-15 15:32:42 +08:00
2016-09-08 15:19:06 +08:00
VOLUME /data
2020-01-26 00:17:59 +08:00
COPY filer.toml /etc/seaweedfs/filer.toml
COPY entrypoint.sh /entrypoint.sh
2016-10-12 18:10:38 +08:00
RUN chmod +x /entrypoint.sh
2016-09-08 15:19:06 +08:00
ENTRYPOINT [ "/entrypoint.sh" ]