Skip to content
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

Remove dependency on package-lock.json in Dockerfiles #44

Closed
rzadp opened this issue May 14, 2019 · 4 comments · Fixed by #66
Closed

Remove dependency on package-lock.json in Dockerfiles #44

rzadp opened this issue May 14, 2019 · 4 comments · Fixed by #66
Labels
contracts related to poa-bridge-contracts oracle related to TokenBridge oracle shared shared components UI related to TokenBridge UI

Comments

@rzadp
Copy link
Contributor

rzadp commented May 14, 2019

The Dockerfiles are COPYing package-lock.json when building images.
We should remove this dependency, or rely on yarn.lock instead.

@rzadp rzadp added oracle related to TokenBridge oracle UI related to TokenBridge UI shared shared components contracts related to poa-bridge-contracts labels May 14, 2019
@rzadp
Copy link
Contributor Author

rzadp commented May 14, 2019

Dependencies problem

The Docker build processes rely on sub-repository package.lock and package-lock.jsonwhen installing dependencies.

Our local build process installs dependencies for all sub-repositories at one time, and uses one yarn.lock in root directory.

We shouldn't have different methods of installing dependencies locally and when building docker images because it can cause tricky errors.

Number of Dockerfiles

There is a total of 7 Dockerfiles, plus one in poa-bridge-contracts.

Screenshot 2019-05-14 at 13 06 20

Seems excessive and increases complexity.

Proposed solution

I'm thinking about having one Dockerfile in root directory. It would install dependencies for sub-repositories using main yarn.lock, and would be used as a build base for sub-repositories docker-compose files.

@akolotov @phahulin @ArseniiPetrovich Do you have any comments on this?

@akolotov
Copy link
Collaborator

akolotov commented May 15, 2019

@patitonar could you take a look and provide your thoughts?

@akolotov
Copy link
Collaborator

akolotov commented May 17, 2019

My understanding is that some of these docker files are used for e2e testing only, whereas others are to build images used in production. @patitonar please correct me if I am wrong.

So probably we will need to differentiate different docker files for different purposes in the final solution anyway.

@patitonar
Copy link
Contributor

We shouldn't have different methods of installing dependencies locally and when building docker images because it can cause tricky errors.

I agree on this, we should use yarn only.

Regarding the Dockerfile most of them are use for e2e testing and can be replaced by accessing the sub-repository needed or be unified in the case of the repeated Parity nodes Dockerfile used on e2e tests. I think the only one used for build for production along with the docker-compose file are the one from the oracle sub-repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contracts related to poa-bridge-contracts oracle related to TokenBridge oracle shared shared components UI related to TokenBridge UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants