Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switched to amd64 version of ipfs #2170

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.2
FROM alpine:3.3
MAINTAINER Brian Tiger Chow <[email protected]>

ENV IPFS_PATH /data/ipfs
Expand All @@ -7,24 +7,24 @@ ENV VERSION master
EXPOSE 4001 5001 8080
# 4001 = Swarm, 5001 = API, 8080 = HTTP transport

VOLUME /data/ipfs

ADD bin/container_daemon /usr/local/bin/start_ipfs
ADD bin/container_shacheck /usr/local/bin/shacheck

ADD https://gobuilder.me/get/github.com/ipfs/go-ipfs/cmd/ipfs/ipfs_${VERSION}_linux-amd64 /usr/local/bin/ipfs_${VERSION}_linux-amd64

RUN adduser -D -h /data -u 1000 ipfs \
&& mkdir -p /data/ipfs && chown ipfs:ipfs /data/ipfs \
&& 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 \
&& apk add --update bash curl ca-certificates \
&& cd /usr/local/bin \
&& /bin/bash /usr/local/bin/shacheck ${VERSION} ipfs_${VERSION}_linux-amd64 \
&& ln -sf ipfs_${VERSION}_linux-amd64 ipfs \
&& chmod 755 /usr/local/bin/start_ipfs \
&& apk del wget zip curl
&& chmod 755 /usr/local/bin/ipfs_${VERSION}_linux-amd64 \
&& apk del --purge curl

USER ipfs

VOLUME /data/ipfs
ENTRYPOINT ["/usr/local/bin/start_ipfs"]

# build: docker build -t go-ipfs .
Expand Down
2 changes: 1 addition & 1 deletion bin/container_shacheck
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
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 }' )
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}')"

Expand Down