Browse Source
Add build arg to choose dev or stable release
pull/1818/head
Robin
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
1 deletions
-
docker/Dockerfile
|
@ -1,5 +1,7 @@ |
|
|
FROM alpine |
|
|
FROM alpine |
|
|
|
|
|
|
|
|
|
|
|
ARG RELEASE=latest # 'latest' or 'dev' |
|
|
|
|
|
|
|
|
RUN \ |
|
|
RUN \ |
|
|
ARCH=$(if [ $(uname -m) == "x86_64" ] && [ $(getconf LONG_BIT) == "64" ]; then echo "amd64"; \ |
|
|
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) == "x86_64" ] && [ $(getconf LONG_BIT) == "32" ]; then echo "386"; \ |
|
@ -13,7 +15,7 @@ RUN \ |
|
|
# Install SeaweedFS and Supercronic ( for cron job mode ) |
|
|
# Install SeaweedFS and Supercronic ( for cron job mode ) |
|
|
apk add --no-cache --virtual build-dependencies --update wget curl ca-certificates && \ |
|
|
apk add --no-cache --virtual build-dependencies --update wget curl ca-certificates && \ |
|
|
apk add fuse && \ |
|
|
apk add fuse && \ |
|
|
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") && \ |
|
|
|
|
|
|
|
|
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") && \ |
|
|
tar -C /usr/bin/ -xzvf /tmp/linux_$ARCH.tar.gz && \ |
|
|
tar -C /usr/bin/ -xzvf /tmp/linux_$ARCH.tar.gz && \ |
|
|
curl -fsSLO "$SUPERCRONIC_URL" && \ |
|
|
curl -fsSLO "$SUPERCRONIC_URL" && \ |
|
|
echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - && \ |
|
|
echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - && \ |
|
|