From d46565b906f4fda6447080c3cd1b775e5f804a6c Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sun, 24 Sep 2023 12:05:55 +0100 Subject: [PATCH] use slim image for hyperbridge docker node --- parachain/node/src/command.rs | 4 +++- scripts/docker/slim.Dockerfile | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 scripts/docker/slim.Dockerfile diff --git a/parachain/node/src/command.rs b/parachain/node/src/command.rs index cb7ddb5c1..e884a33b9 100644 --- a/parachain/node/src/command.rs +++ b/parachain/node/src/command.rs @@ -24,7 +24,9 @@ fn load_spec(id: &str) -> std::result::Result, String> { let id = u32::from_str(id).expect("can't parse Id into u32"); Box::new(chain_spec::development_config(id)) }, - "gargantuan" => Box::new(chain_spec::ChainSpec::from_json_bytes(include_bytes!("../../chainspec/gargantuan-raw.json"))), + "gargantuan" => Box::new(chain_spec::ChainSpec::from_json_bytes( + include_bytes!("../../chainspec/gargantuan-raw.json").to_vec(), + )?), "" | "local" => Box::new(chain_spec::local_testnet_config()), path => Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?), }) diff --git a/scripts/docker/slim.Dockerfile b/scripts/docker/slim.Dockerfile new file mode 100644 index 000000000..5fba511e4 --- /dev/null +++ b/scripts/docker/slim.Dockerfile @@ -0,0 +1,8 @@ +FROM docker.io/library/debian:bullseye-slim + +WORKDIR / + +COPY ./hyperbridge ./ + + +ENTRYPOINT ["./hyperbridge"] \ No newline at end of file