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

Optimise Docker builds #6919

Merged
merged 4 commits into from
Jun 25, 2024
Merged

Optimise Docker builds #6919

merged 4 commits into from
Jun 25, 2024

Conversation

n1koo
Copy link
Member

@n1koo n1koo commented May 3, 2024

Related to #6902

  • Move all builds from alpine to debian-slim
  • Leverage image caching
  • Minimise image sizes with .dockerignore and more specific builds
  • Modernise the builds to use latest actions (ready for GHA cache too)

Part of this we also

Requires opencrvs/opencrvs-countryconfig#160 to be merged at the same time to ensure deploys dont break on the new baseimage

@n1koo n1koo force-pushed the optimise_docker_builds branch 2 times, most recently from 012465d to f905f35 Compare May 11, 2024 10:05
@n1koo n1koo changed the title Optimise auth as first app, leverage cached action Optimise Docker builds May 11, 2024
@n1koo n1koo force-pushed the optimise_docker_builds branch 2 times, most recently from d6cd559 to 39ad3d7 Compare May 24, 2024 12:02

RUN yarn install
RUN yarn install --frozen-lockfile --ignore-scripts
Copy link
Member

Choose a reason for hiding this comment

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

What's the ignore-scripts here?

Comment on lines 12 to 16
base:
image: opencrvs/ocrvs-base:${VERSION}
build:
context: .
dockerfile: ./packages/Dockerfile.base
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to define the base image here? The reason I'm asking is I noticed deployment failing with

Server failed to download opencrvs/ocrvs-base:3f89c3d

when I built images from this branch and deployed. Based on this depends_on also should control the order services start up but we don't run anything for base outside build, right?

https://docs.docker.com/compose/compose-file/05-services/#depends_on

@n1koo n1koo force-pushed the optimise_docker_builds branch 4 times, most recently from 907f01c to 2ab1195 Compare June 14, 2024 15:32
@n1koo n1koo force-pushed the optimise_docker_builds branch 2 times, most recently from 6a23862 to 6576893 Compare June 21, 2024 11:19
@rikukissa rikukissa merged commit b3b38b4 into develop Jun 25, 2024
39 checks passed
github-actions bot pushed a commit that referenced this pull request Jun 25, 2024
rikukissa added a commit that referenced this pull request Jun 26, 2024
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.

2 participants