Closed whalelephant closed 4 years ago
So far so good! The first docker run command in your issue description works for me:
The second command however...
$ docker run \
-p 9944:9944 \
-p 9933:9933 \
-p 30333:30333 \
-p 9615:9615 \
-it \
--rm \
--name sub-ipfs \
substrate-ipfs \
substrate
Gives me this in the logs. Not sure if consequential. @ljedrz ?
2020-10-06 13:39:14.439 tokio-runtime-worker WARN telemetry ❌ Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F: Custom { kind: Other, error: Other(B(A(Transport(Underlying(Kind(ConnectionRefused)))))) }
Still getting a 217MB image at the end as well, wondering if we can get that smaller somehow :thinking:
Edit: although to your credit, the builder image is 7 GB :rofl:
REPOSITORY TAG IMAGE ID CREATED SIZE
substrate-ipfs latest 0349ec5e1bdb 5 minutes ago 217MB
<none> <none> 04088caa4803 5 minutes ago 7.07GB
Not sure if consequential.
don't think so, looks like just some telemetry server
😄 it did slim down quite a bit!
The binaries themselves are around 120MB and the container 69MB, can look at what is not needed in the container after the updates.
-rwxr-xr-x 2 root root 53M Oct 6 08:58 node-template
-rwxr-xr-x 2 root root 65M Oct 6 08:57 substrate
@whalelephant This looks great, and I'm comfortable approving this for merging into our branch, just the comment above and the questions below remain:
@whalelephant minor housekeeping thing - let's change all the references from substrate-ipfs
to offchain-ipfs
as I'll be publishing the docker image to eqlabs/offchain-ipfs
Closing this now that we have the branch :+1: re-open if I'm wrong.
Updates: This is now updates to the bleeding edge branch with
Warning: Dockerfile does not expose port for
ipfsConnect
function.Building the image
This is a multistage build with the target being an image with name
substrate-ipfs:latest
containing the substrate binary and the node-template binary.Run the node-template binary
By default, the container will execute a command for staring the node-template binary with a development chainspec. We expose the default websockets, rpc, p2p and promentheus ports from the container to the host machine for interactions.
To run with persistent storage volume between contains, create a volume with
docker volume create substrate-ipfs-vol
and-v substrate-ipfs-vol:/substrate-ipfs
to the docker run command.Run substrate node
To overwrite the default container commands, simply add binary name followed by flags / options / subcommand.