Joystream / substrate-node-joystream

Joystream Full Node
https://www.joystream.org
GNU General Public License v3.0
15 stars 16 forks source link

Add Dockerfile. Fixes #60 #72

Closed suda closed 5 years ago

suda commented 5 years ago

Hello! I based this work on the rust-wasm Dockerfile and thanks to @mnaamani suggestion of using Rustup 1.34.0 got it building. To build it on your own, run:

$ docker build .

I would also suggest creating Joystream's Docker Hub account: https://hub.docker.com/u/joystream


Joystream address: 5GxcUjY3tXYaDnm6LDu3yRdgE9wACXbmqjYVVAg8FwRZYPmF

mnaamani commented 5 years ago

Thanks for this contribution @suda Will test it out.

mnaamani commented 5 years ago

So after I successfully built:

Removing intermediate container 0c2dc5ac7e05
 ---> 03195bfc044d
Step 7/7 : ENTRYPOINT "/root/.cargo/bin/joystream-node"
 ---> Running in 25a2ad5d00d1
Removing intermediate container 25a2ad5d00d1
 ---> 49b62b70a00b
Successfully built 49b62b70a00b

I see the image created (I forgot to tag it)

MokoBook:joyful mokhtar$ docker image list
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
<none>              <none>              49b62b70a00b        30 minutes ago      4.38GB
liuchong/rustup     1.34.0             426e8ad3e90b        4 days ago          1.19GB

Running it with docker run 49b62b70a00b ... Works nicely:

MokoBook:joyful mokhtar$ docker run 49b62b70a00b
2019-04-29 08:26:15 Joystream Node
2019-04-29 08:26:15   version 1.0.0-46cd642-x86_64-linux-gnu
2019-04-29 08:26:15   by Joystream, 2019
2019-04-29 08:26:15 Chain specification: Joystream Testnet v2
2019-04-29 08:26:15 Node name: descriptive-bike-4021
2019-04-29 08:26:15 Roles: FULL
2019-04-29 08:26:15 Generated a new keypair: 37670a556aa9b44171f3b84668aa32c12f87907a46ba2bbbded331ae0d201c94 (5DKM6mL9...)
2019-04-29 08:26:15 Initializing Genesis block/state (state: 0x18cc…d0b4, header-hash: 0x78be…87c7)
2019-04-29 08:26:15 Loaded block-time = 6 seconds from genesis on first-launch
2019-04-29 08:26:15 Loading GRANDPA authority set from genesis on what appears to be first startup.
2019-04-29 08:26:15 Best block: #0
2019-04-29 08:26:15 Local node address is: /ip4/0.0.0.0/tcp/30333/p2p/QmQLuCzZ17fUxBe117AZm56SLjzFDhgaE6dfhLJtdoTwe4
2019-04-29 08:26:15 Listening for new connections on 127.0.0.1:9944.
mnaamani commented 5 years ago

So I'm curios, in docker hub would we be publishing the image Dockerfile or can we actually publish the built image "49b62b70a00b" ?

suda commented 5 years ago

Once you'd have the Joystream's Docker Hub account, when building you'd tag it:

$ docker build -t joystream/substrate-node .

and then you could push it:

$ docker push joystream/substrate-node