Skip to content

build: single, optimized Dockerfile for all services - #1043

Merged
shumkov merged 35 commits into
v0.25-devfrom
feat/ci-cd-caching
May 16, 2023
Merged

shumkov merged 35 commits into
v0.25-devfrom
feat/ci-cd-caching

Conversation

@lklimek

@lklimek lklimek commented May 8, 2023 •

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

Docker build process is split into several Dockerfiles. This is quite hard to manage (need to replicate any improvements between Dockerfiles) and not optimal (some parts of Dockerfile doing the same logic are executed multiple times).

What was done?

  • Merged all /packages/*/Dockerfile (except Envoy) into one /Dockerfile
  • Optimized for sccache and cache mounts
  • Build javascript artifacts inside docker
  • Added documentation
  • Updated dashmate and github actions accordingly

How Has This Been Tested?

  • locally, with time docker buildx build -f Dockerfile --build-arg SCCACHE_MEMCACHED=tcp://172.17.0.1:11211 --progress=plain .
  • in local multipass VM, using yarn start
  • inside github actions

Breaking Changes

Changed Dockerfile locations and structure can have impact on people building Docker images outside of dashmate.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@lklimek lklimek changed the title build: Single, optimized Dockerfile for all services build: single, optimized Dockerfile for all services May 8, 2023
@lklimek
lklimek force-pushed the feat/ci-cd-caching branch from e9a38e6 to b16e844 Compare May 8, 2023 11:07
Comment thread Cargo.lock Resolved
Comment thread Dockerfile Resolved
Comment thread Dockerfile Resolved
Comment thread Dockerfile Resolved
Comment thread Dockerfile Resolved
Comment thread Dockerfile Resolved
Comment thread Dockerfile Resolved
@lklimek
lklimek force-pushed the feat/ci-cd-caching branch from de88adc to 7fc3ced Compare May 9, 2023 08:12
@lklimek
lklimek marked this pull request as ready for review May 11, 2023 13:03
@lklimek
lklimek requested a review from antouhou as a code owner May 11, 2023 13:03
Comment thread .dockerignore Resolved
Comment thread .github/actions/docker/action.yaml Resolved
Comment thread Cargo.lock Resolved
Comment thread Dockerfile Resolved
Comment thread Dockerfile Resolved
Comment thread Dockerfile Resolved
Comment thread Dockerfile Resolved
Comment thread Dockerfile Resolved
Comment thread Dockerfile Resolved
Comment thread packages/rs-dpp/src/block/block_info.rs Resolved
@lklimek
lklimek force-pushed the feat/ci-cd-caching branch from 54c7b8c to f21a34e Compare May 12, 2023 07:04
@lklimek
lklimek force-pushed the feat/ci-cd-caching branch from 1ad7bff to 19c3368 Compare May 12, 2023 07:50
@lklimek lklimek self-assigned this May 12, 2023
@lklimek
lklimek requested review from shumkov and strophy May 12, 2023 11:16
Comment thread Dockerfile Resolved
strophy
strophy previously approved these changes May 12, 2023

@strophy strophy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this makes the build process much clearer to understand

Comment thread Dockerfile Resolved
Comment thread Dockerfile Resolved
Comment thread README.md Resolved
Comment thread packages/dashmate/docker/entrypoint.sh Resolved
Comment thread packages/wasm-dpp/scripts/build-wasm.sh Resolved

@shumkov shumkov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@shumkov
shumkov requested a review from strophy May 16, 2023 05:30
@shumkov
shumkov merged commit 769340e into v0.25-dev May 16, 2023
@shumkov
shumkov deleted the feat/ci-cd-caching branch May 16, 2023 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants