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

Improve dockerization #2947

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

Mbaoma
Copy link
Contributor

@Mbaoma Mbaoma commented Nov 6, 2024

Description

  • I updated the Dockerfile to use multistage build to reduce image build time when the docker-compose up --build command is run.

This PR fixes #
My pull request reduced the duration of the Run the Build job in the pipeline from 6 minutes and 15 seconds to 2 minutes and 8 seconds.

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

@Mbaoma Mbaoma requested a review from sgoggins as a code owner November 6, 2024 15:34
@GregSutcliffe
Copy link
Collaborator

This looks pretty good to me for the most part - however, it looks like the dependency scripts (RUN ./scripts/docker/install-workers-deps.sh and RUN ./scripts/docker/install-go.sh) are no longer being run? I can see you are calling a chmod on them, but they no longer appear as a RUN - that might account for the speedup?

@Mbaoma
Copy link
Contributor Author

Mbaoma commented Dec 4, 2024

@GregSutcliffe Thank you for catching that! Yes, that accounts for the speedup, as those scripts are typically resource-intensive. However, upon review, I ran the installation scripts in the runtime stage, to ensure the dependencies are installed before the application starts.

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