-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(docker): cleanup docker files #4044
base: develop
Are you sure you want to change the base?
Conversation
f6fe4ab
to
80d9f19
Compare
f1b7972
to
c31029f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I have ran the following DockerFile by using ./build.sh
in each folder, which can generate images successfully.
- docker/iota-bridge-indexer/Dockerfile
- docker/iota-graphql-rpc/Dockerfile
- docker/iota-indexer-tidb/Dockerfile
- docker/iota-indexer/Dockerfile
- docker/iota-node/Dockerfile
- docker/iota-rosetta-local/Dockerfile
- docker/iota-source-validation-service/Dockerfile
- docker/iota-tools/Dockerfile
- docker/iota/Dockerfile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👏
a5030cc
to
47d09fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #3867
This PR does some cleanup of the existing dockerfiles in the repository.
The biggest change is that the correct toolchain version is read from the
rust-toolchain.toml
, and then passed to the dockerfile to load the correct rust build image with the correct version.It also introduces the usage of
clang
andlld
to compile the binaries. This should speed up the whole image building process.The build scripts were all unified to one, which gets then called with the only parameter that actually was different between those scripts, which is the name of the resulting container.
All containers now accept the
PROFILE
andCARGO_BUILD_FEATURES
flags.The unused
iota-service
dockerfiles were removed. It was used for the nameservice which doesn't exist.The existing
iota-source-service
was renamed toiota-source-validation-service
, because that actually is what is build inside the container.The rosetta docker files were moved to the root docker folder, instead of living inside of the iota-rosetta crate. This was the only exception in the repository, so I decided to move them to have a common place for all available dockerfiles.
Topics for discussion:
/usr/local/bin
instead of/opt/iota/bin
for the location of the binaries. Before there was a mix of both between the images. I personally prefer/usr/local/bin
because this is available system wide without modifications to the path variable, but I'm fine to change that in all containers if needed. (I now saw that they call the/usr/local/bin
the legacy usage in one comment 👀 )iota-rosetta-devnet
makes any sense, because it clones another branch that doesn't even exist instead of using the local source. I would keep it for now, but we should cleanup rosetta in another PR, and it should be split into several containers (node, rosetta, cli) and use a docker compose file to unite them.