Dockerfile 591 Bytes
Newer Older
1
FROM golang:1.4
2 3
MAINTAINER Brian Tiger Chow <btc@perfmode.com>

4 5
ADD . /go/src/github.com/ipfs/go-ipfs
RUN cd /go/src/github.com/ipfs/go-ipfs/cmd/ipfs && go install
6

7
RUN cp /go/src/github.com/ipfs/go-ipfs/bin/container_daemon /usr/local/bin/start_ipfs && \
8
    chmod 755 /usr/local/bin/start_ipfs
9

10 11
EXPOSE 4001 5001 8080
# 4001 = Swarm, 5001 = API, 8080 = HTTP transport
12

13
ENTRYPOINT ["/usr/local/bin/start_ipfs"]
14 15

# build:    docker build -t go-ipfs .
16 17
# run:      docker run -p 4001:4001 -p 5001:5001 go-ipfs:latest
# run:      docker run -p 8080:8080 -p 4001:4001 -p 5001:5001 go-ipfs:latest