docker: General purpose docker container.#4816
Conversation
There was a problem hiding this comment.
This is the main change compared to the winder/docker repo. The files were moved from the project root to the ./docker/files directory, and files which already exist in this repo (genesis files, update.sh, config.json) are used directly instead of copied.
| mainnet) ID="<network>.algorand.network";; | ||
| testnet) ID="<network>.algorand.network";; | ||
| betanet) ID="<network>.algodev.network";; | ||
| alphanet) ID="<network>.algodev.network";; |
There was a problem hiding this comment.
I also added alphanet support.
Codecov Report
@@ Coverage Diff @@
## master #4816 +/- ##
==========================================
- Coverage 54.66% 54.63% -0.03%
==========================================
Files 417 417
Lines 53735 53735
==========================================
- Hits 29373 29357 -16
- Misses 21930 21942 +12
- Partials 2432 2436 +4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
This is for developer use only, right? Otherwise we should ensure people running dockerized mainnet nodes use the official binaries from the DEB or RPM packages we distribute with every release. |
It's designed as a general purpose container. |
|
One of the things that I think would be beneficial is having is having private network creation being a part of the build process and not runtime. As discussed on Slack, there are pros and cons of this approach. Pros
Cons
For con 1, I personally view the local network as a "deliverable" that makes sense to include in the build process. It's a key functionality that is essential to the use case of developers, most of which will be using the same exact configuration (see sandbox). I think con 2 is very reasonable. Improving the experience for most users (devs wanting the standard sandnet configuration) while having more complex configuration require a re-build is a reasonable compromise in my opinion. Edit: Another option is to keep this image as is, but create a image specifically for private networks that builds from this image, but having one image would be more simple in my opinion. |
|
What is the rationale for using the update script? Simply building from source would simplify the build-process and allow for proper cache busting. If the reasoning is to use the released binaries, why is it so important to use the binaries? ETH for example does not have reproducible builds and their docker image simply builds from source. Is having official docker images not good enough? Edit: I realized we could use an API to get the latest channel release for the sake of cache-busting, but the point of simplicity still stands. |
|
|
||
| Private networks work a little bit differently. They are configured with, potentially, several data directories. The default topology supplied with this container is installed to `/algod/`, and has a single node named `data`. This means the private network has a data directory at `/algod/data`, matching the production configuration. | ||
|
|
||
| Because the root directory contains some metadata, if persistence of the private network is required, you should mount the volume `/algod/` instead of `/algod/data`. This will ensure the extra metadata is included when changing images. |
There was a problem hiding this comment.
what if the recommendation was to mount /algod for both production and private networks? to remove the caveat.
algolucky
left a comment
There was a problem hiding this comment.
good starting point. we can iterate from here if necessary.
algobarb
left a comment
There was a problem hiding this comment.
From what my team has validated, I'm good to approve for merge. We plan to use these files as a starting base to add changes on top of.
Summary
Port of the docker container here: https://github.com/winder/docker
Some of the decisions made in this container might not make sense with the Dockerfile bundled with the source. The most glaring is that the container downloads source from S3 (if the CHANNEL build-arg is used), or from GitHub (if the URL/BRANCH/SHA build-args are used).
Background
This container incorporates features and suggestions from many places, the biggest influences are:
Resources
Test Plan
From the project root, build:
Then run: