aboutsummaryrefslogtreecommitdiff
path: root/docker/Dockerfile
diff options
context:
space:
mode:
authoryourchanges <yourchanges@gmail.com>2020-07-10 09:44:32 +0800
committerGitHub <noreply@github.com>2020-07-10 09:44:32 +0800
commite67096656b0fcdc313c7d8983b6ce36a54d794a3 (patch)
tree4d6cfd722cf6e19b5aa8253e477ddc596ea5e193 /docker/Dockerfile
parent2b3cef7780a5e91d2072a33411926f9b30c88ee2 (diff)
parent1b680c06c1de27e6a3899c089ec354a9eb08ea44 (diff)
downloadseaweedfs-e67096656b0fcdc313c7d8983b6ce36a54d794a3.tar.xz
seaweedfs-e67096656b0fcdc313c7d8983b6ce36a54d794a3.zip
Merge pull request #1 from chrislusf/master
update
Diffstat (limited to 'docker/Dockerfile')
-rw-r--r--docker/Dockerfile27
1 files changed, 22 insertions, 5 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index c7a343111..7146b91c7 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,9 +1,24 @@
-FROM frolvlad/alpine-glibc
+FROM alpine
-# Tried to use curl only (curl -o /tmp/linux_amd64.tar.gz ...), however it turned out that the following tar command failed with "gzip: stdin: not in gzip format"
-RUN apk add --no-cache --virtual build-dependencies --update wget curl ca-certificates && \
- wget -P /tmp https://github.com/$(curl -s -L https://github.com/chrislusf/seaweedfs/releases/latest | egrep -o 'chrislusf/seaweedfs/releases/download/.*/linux_amd64.tar.gz') && \
- tar -C /usr/bin/ -xzvf /tmp/linux_amd64.tar.gz && \
+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') && \
+ 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 && \
+ wget -P /tmp https://github.com/$(curl -s -L https://github.com/chrislusf/seaweedfs/releases/latest | egrep -o "chrislusf/seaweedfs/releases/download/.*/linux_$ARCH.tar.gz") && \
+ tar -C /usr/bin/ -xzvf /tmp/linux_$ARCH.tar.gz && \
+ 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/*
@@ -22,6 +37,8 @@ EXPOSE 9333
# s3 server http port
EXPOSE 8333
+RUN mkdir -p /data/filerldb2
+
VOLUME /data
COPY filer.toml /etc/seaweedfs/filer.toml