please provide real-net docker images #1141

Open
opened 2025-12-28 17:15:22 +00:00 by sami · 17 comments
Owner

Originally created by @532910 on GitHub (Jun 13, 2023).

and fix https://github.com/nspcc-dev/neo-go/issues/3038 for this images

Originally created by @532910 on GitHub (Jun 13, 2023). and fix https://github.com/nspcc-dev/neo-go/issues/3038 for this images
Author
Owner

@roman-khimov commented on GitHub (Jun 13, 2023):

What do you mean by real-net? mainnet/testnet?

@roman-khimov commented on GitHub (Jun 13, 2023): What do you mean by `real-net`? mainnet/testnet?
Author
Owner

@532910 commented on GitHub (Jun 13, 2023):

yep, not privnet

@532910 commented on GitHub (Jun 13, 2023): yep, not privnet
Author
Owner

@roman-khimov commented on GitHub (Jun 13, 2023):

Configurations are there in the image, it's just a matter of running the container with appropriate flags.

@roman-khimov commented on GitHub (Jun 13, 2023): Configurations are there in the image, it's just a matter of running the container with appropriate flags.
Author
Owner

@532910 commented on GitHub (Jun 13, 2023):

appropriate flags will not remove bash and alpine from image that I don't need

@532910 commented on GitHub (Jun 13, 2023): appropriate flags will not remove bash and alpine from image that I don't need
Author
Owner

@roman-khimov commented on GitHub (Jun 13, 2023):

They can't be removed, see #3038, there is a shell script inside.

@roman-khimov commented on GitHub (Jun 13, 2023): They can't be removed, see #3038, there is a shell script inside.
Author
Owner

@532910 commented on GitHub (Jun 13, 2023):

the shell script is called privnet-entrypoint.sh this way it's for privnet only, this way I don't nedd it for testnet and mainnet

@532910 commented on GitHub (Jun 13, 2023): the shell script is called `privnet-entrypoint.sh` this way it's for privnet only, this way I don't nedd it for testnet and mainnet
Author
Owner

@532910 commented on GitHub (Jun 13, 2023):

moreover, we don't use any shell scripts for our deployments, so it doesn't required for neogo

@532910 commented on GitHub (Jun 13, 2023): moreover, we don't use any shell scripts for our deployments, so it doesn't required for neogo
Author
Owner

@roman-khimov commented on GitHub (Jun 13, 2023):

It doesn't matter much how it's called, the function it provides (handling block dumps) is generic and can be used for any network. And it is required, AIO will break without it for example.

@roman-khimov commented on GitHub (Jun 13, 2023): It doesn't matter much how it's called, the function it provides (handling block dumps) is generic and can be used for any network. And it is required, AIO will break without it for example.
Author
Owner

@532910 commented on GitHub (Jun 13, 2023):

this way:

  1. script must be renamed (privnet must be removed from it's name as it's not for privnet only)
  2. aio must be a one more docker image
@532910 commented on GitHub (Jun 13, 2023): this way: 1. script must be renamed (`privnet` must be removed from it's name as it's not for privnet only) 2. aio must be a one more docker image
Author
Owner

@roman-khimov commented on GitHub (Jun 13, 2023):

I prefer providing one image that works everywhere, the price is not that high here. Renaming is OK, but it's cosmetic.

@roman-khimov commented on GitHub (Jun 13, 2023): I prefer providing one image that works everywhere, the price is not that high here. Renaming is OK, but it's cosmetic.
Author
Owner

@roman-khimov commented on GitHub (Jun 13, 2023):

OK, in fact there is a -p used in this script, so it is privnet-only. Which makes we wonder how can it be improved. Maybe #2978 makes it all irrelevant, @AnnaShaleva?

@roman-khimov commented on GitHub (Jun 13, 2023): OK, in fact there is a `-p` used in this script, so it _is_ privnet-only. Which makes we wonder how can it be improved. Maybe #2978 makes it all irrelevant, @AnnaShaleva?
Author
Owner

@roman-khimov commented on GitHub (Jun 13, 2023):

Or maybe we want to make it C#-style and handle all of this in the node itself?

@roman-khimov commented on GitHub (Jun 13, 2023): Or maybe we want to make it C#-style and handle all of this in the node itself?
Author
Owner

@532910 commented on GitHub (Jun 13, 2023):

I prefer providing one image that works everywhere

as #3038 says, docker is intended to run the only application, without unnecessary deps

AIO, privnet or anything else should create it's own docker image based on neogo-only docker image

@532910 commented on GitHub (Jun 13, 2023): > I prefer providing one image that works everywhere as #3038 says, docker is intended to run the only application, without unnecessary deps AIO, privnet or anything else should create it's own docker image based on neogo-only docker image
Author
Owner

@AnnaShaleva commented on GitHub (Jun 14, 2023):

Maybe https://github.com/nspcc-dev/neo-go/issues/2978 makes it all irrelevant

Not completely. I see two options here:

  1. Provide another flag (-m or -t) to the start command depending on the image target.
  2. Use single configuration file inside the container and provide --config-file option to the start CMD.

But since we have CMD instruction inside our single Dockerfile, then we have to make some additional movements to generate proper images for privnet/testnet/mainnet. For privnet it is already made, our docker compose file has command: "node --config-path /config --privnet" instruction that overrides the default CMD one from Dockerfile. But I'm not sure what can be done to override testnet/mainnet CMD instructions.

Thus, these two ways seems equal to me.

@AnnaShaleva commented on GitHub (Jun 14, 2023): > Maybe https://github.com/nspcc-dev/neo-go/issues/2978 makes it all irrelevant Not completely. I see two options here: 1. Provide another flag (`-m` or `-t`) to the start command depending on the image target. 2. Use single configuration file inside the container and provide `--config-file` option to the start CMD. But since we have CMD instruction inside our single Dockerfile, then we have to make some additional movements to generate proper images for privnet/testnet/mainnet. For privnet it is already made, our docker compose file has ` command: "node --config-path /config --privnet"` instruction that overrides the default `CMD` one from Dockerfile. But I'm not sure what can be done to override testnet/mainnet CMD instructions. Thus, these two ways seems equal to me.
Author
Owner

@AnnaShaleva commented on GitHub (Jun 14, 2023):

Or maybe we want to make it C#-style and handle all of this in the node itself

AFAIK, C# node doesn't handle it by herself. By default it uses a single config.json file, and the node operator should provide the proper config depending on the network. So it's the node operator that is responsible for the network configuration.

@AnnaShaleva commented on GitHub (Jun 14, 2023): > Or maybe we want to make it C#-style and handle all of this in the node itself AFAIK, C# node doesn't handle it by herself. By default it uses a single `config.json` file, and the node operator should provide the proper config depending on the network. So it's the node operator that is responsible for the network configuration.
Author
Owner

@AnnaShaleva commented on GitHub (Jun 14, 2023):

When it comes to the node restore (privnet-entrypoint.sh) then yes, we can add an argumet to the node command and accept the *.acc file to restore the node before the start automatically. I vote for this option, this will allow to get rid of the entrypoint script.

@AnnaShaleva commented on GitHub (Jun 14, 2023): When it comes to the node restore (`privnet-entrypoint.sh`) then yes, we can add an argumet to the `node` command and accept the `*.acc` file to restore the node before the start automatically. I vote for this option, this will allow to get rid of the entrypoint script.
Author
Owner

@roman-khimov commented on GitHub (Dec 21, 2023):

BTW, dev-env no longer needs/uses a block dump now, so we can reconsider scripts here.

@roman-khimov commented on GitHub (Dec 21, 2023): BTW, dev-env no longer needs/uses a block dump now, so we can reconsider scripts here.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neo-go#1141
No description provided.