-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MIT Signed-off-by: Knut Ahlers <[email protected]>
- Loading branch information
Showing
2 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ FROM alpine:3.2 | |
MAINTAINER Brian Tiger Chow <[email protected]> | ||
|
||
ENV IPFS_PATH /data/ipfs | ||
ENV VERSION master | ||
|
||
RUN adduser -D -h /data -u 1000 ipfs && \ | ||
mkdir -p /data/ipfs && chown ipfs:ipfs /data/ipfs | ||
|
@@ -11,14 +12,17 @@ EXPOSE 4001 5001 8080 | |
|
||
VOLUME /data/ipfs | ||
|
||
RUN apk add --update bash wget ca-certificates zip \ | ||
&& wget https://gobuilder.me/get/github.com/ipfs/go-ipfs/cmd/ipfs/ipfs_master_linux-386.zip \ | ||
&& unzip ipfs_master_linux-386.zip \ | ||
&& rm ipfs_master_linux-386.zip \ | ||
ADD bin/container_daemon /usr/local/bin/start_ipfs | ||
ADD bin/container_shacheck /usr/local/bin/shacheck | ||
|
||
RUN apk add --update bash curl wget ca-certificates zip \ | ||
&& wget https://gobuilder.me/get/github.com/ipfs/go-ipfs/cmd/ipfs/ipfs_${VERSION}_linux-386.zip \ | ||
&& /bin/bash /usr/local/bin/shacheck ${VERSION} ipfs_${VERSION}_linux-386.zip \ | ||
&& unzip ipfs_${VERSION}_linux-386.zip \ | ||
&& rm ipfs_${VERSION}_linux-386.zip \ | ||
&& mv ipfs/ipfs /usr/local/bin/ipfs \ | ||
&& wget -O /usr/local/bin/start_ipfs https://raw.githubusercontent.com/ipfs/go-ipfs/master/bin/container_daemon \ | ||
&& chmod 755 /usr/local/bin/start_ipfs \ | ||
&& apk del wget zip | ||
&& apk del wget zip curl | ||
|
||
USER ipfs | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash -xe | ||
|
||
VERSION=$1 | ||
FILENAME=$2 | ||
|
||
ONLINE_SHA=$( curl "https://gobuilder.me/api/v1/github.com/ipfs/go-ipfs/cmd/ipfs/signed-hashes/${VERSION}" 2>/dev/null | grep -A 4 ${FILENAME} | grep sha1 | awk '{ print $3 }' ) | ||
|
||
echo "Checking SHA1: ${ONLINE_SHA} == $(sha1sum ${FILENAME} | awk '{print $1}')" | ||
|
||
echo "${ONLINE_SHA} ${FILENAME}" | sha1sum -cw |