diff --git a/README.md b/README.md index 7aa47baf01..fe4764771f 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ You can check the development status at the [Waffle Board](https://waffle.io/ipf - [Node Management](#node-management) - [Domain data types](#domain-data-types) - [FAQ](#faq) +- [Running js-ipfs with Docker](#running-js-ipfs-with-docker) - [Packages](#packages) - [Development](#development) - [Clone and install dependencies](#clone-and-install-dependencies) @@ -501,6 +502,38 @@ HOME=~/.electron-gyp npm install If you find any other issue, please check the [`Electron Support` issue](https://github.com/ipfs/js-ipfs/issues/843). +## Running js-ipfs with Docker + +We have automatic Docker builds setup with Docker Hub: https://hub.docker.com/r/ipfs/js-ipfs/ + +All branches in the Github repository maps to a tag in Docker Hub, except `master` Git branch which is mapped to `latest` Docker tag. + +You can run js-ipfs like this: + +``` +$ docker run -it -p 4002:4002 -p 4003:4003 -p 5002:5002 -p 9090:9090 ipfs/js-ipfs:latest + +initializing ipfs node at /root/.jsipfs +generating 2048-bit RSA keypair...done +peer identity: Qmbd5jx8YF1QLhvwfLbCTWXGyZLyEJHrPbtbpRESvYs4FS +to get started, enter: + + jsipfs files cat /ipfs/QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr/readme + +Initializing daemon... +Using wrtc for webrtc support +Swarm listening on /ip4/127.0.0.1/tcp/4003/ws/ipfs/Qmbd5jx8YF1QLhvwfLbCTWXGyZLyEJHrPbtbpRESvYs4FS +Swarm listening on /ip4/172.17.0.2/tcp/4003/ws/ipfs/Qmbd5jx8YF1QLhvwfLbCTWXGyZLyEJHrPbtbpRESvYs4FS +Swarm listening on /ip4/127.0.0.1/tcp/4002/ipfs/Qmbd5jx8YF1QLhvwfLbCTWXGyZLyEJHrPbtbpRESvYs4FS +Swarm listening on /ip4/172.17.0.2/tcp/4002/ipfs/Qmbd5jx8YF1QLhvwfLbCTWXGyZLyEJHrPbtbpRESvYs4FS +API is listening on: /ip4/0.0.0.0/tcp/5002 +Gateway (readonly) is listening on: /ip4/0.0.0.0/tcp/9090 +Daemon is ready + +$ curl --silent localhost:5002/api/v0/id | jq .ID +"Qmbd5jx8YF1QLhvwfLbCTWXGyZLyEJHrPbtbpRESvYs4FS" +``` + ## Packages | Package | Version | Deps | DevDeps | Travis | Circle | AppVeyor | Coverage |