Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
fd5ddcb7
Commit
fd5ddcb7
authored
Jan 17, 2016
by
Knut Ahlers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build ipfs cmd inside docker container
License: MIT Signed-off-by:
Knut Ahlers
<
knut@ahlers.me
>
parent
aeaae901
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
Dockerfile
Dockerfile
+12
-9
No files found.
Dockerfile
View file @
fd5ddcb7
FROM
alpine:3.
2
FROM
alpine:3.
3
MAINTAINER
Brian Tiger Chow <btc@perfmode.com>
ENV
IPFS_PATH /data/ipfs
ENV
VERSION master
ENV
GOPATH /go:/go/src/github.com/ipfs/go-ipfs/Godeps/_workspace
EXPOSE
4001 5001 8080
# 4001 = Swarm, 5001 = API, 8080 = HTTP transport
...
...
@@ -10,16 +10,19 @@ EXPOSE 4001 5001 8080
ADD
bin/container_daemon /usr/local/bin/start_ipfs
ADD
bin/container_shacheck /usr/local/bin/shacheck
ADD
. /go/src/github.com/ipfs/go-ipfs
WORKDIR
/go/src/github.com/ipfs/go-ipfs/cmd/ipfs
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 ca-certificates git go
\
&&
go
install
-ldflags
"-X github.com/ipfs/go-ipfs/repo/config.CurrentCommit=
$(
git rev-parse
--short
HEAD 2> /dev/null
||
echo
unknown
)
"
\
&&
mv
/go/bin/ipfs /usr/local/bin/ipfs
\
&&
chmod
755 /usr/local/bin/start_ipfs
\
&&
apk del wget zip curl
&&
apk del
--purge
go git
WORKDIR
/
RUN
rm
-rf
/go/src/github.com/ipfs/go-ipfs
USER
ipfs
VOLUME
/data/ipfs
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment