mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 02:47:48 +08:00
commit
6c193625d5
14
Dockerfile
14
Dockerfile
@ -1,15 +1,17 @@
|
||||
FROM golang:1.3
|
||||
FROM golang:1.4
|
||||
MAINTAINER Brian Tiger Chow <btc@perfmode.com>
|
||||
|
||||
ADD . /go/src/github.com/jbenet/go-ipfs
|
||||
RUN cd /go/src/github.com/jbenet/go-ipfs/cmd/ipfs && go install
|
||||
|
||||
EXPOSE 4001 5001 4002/udp
|
||||
RUN cp /go/src/github.com/jbenet/go-ipfs/bin/container_daemon /usr/local/bin/start_ipfs && \
|
||||
chmod 755 /usr/local/bin/start_ipfs
|
||||
|
||||
ENTRYPOINT ["ipfs"]
|
||||
EXPOSE 4001 5001 8080
|
||||
# 4001 = Swarm, 5001 = API, 8080 = HTTP transport
|
||||
|
||||
CMD ["daemon", "--init"]
|
||||
ENTRYPOINT ["/usr/local/bin/start_ipfs"]
|
||||
|
||||
# build: docker build -t go-ipfs .
|
||||
# run: docker run -p 4001:4001 -p 5001:5001 go-ipfs:latest daemon --init
|
||||
# run: docker run -p 4002:4002/udp -p 4001:4001 -p 5001:5001 go-ipfs:latest daemon --init
|
||||
# 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
|
||||
|
||||
5
bin/container_daemon
Normal file
5
bin/container_daemon
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
ipfs init
|
||||
ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001
|
||||
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080
|
||||
ipfs daemon
|
||||
Loading…
Reference in New Issue
Block a user