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

Docker build & run streamlining #15

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

Conversation

guillheu
Copy link

@guillheu guillheu commented Sep 5, 2024

Checklist

  • My branch is up-to-date with upstream/develop branch.
  • Everything works and tested for Python 3.8.0 and above.
  • I ran pre-commit checks against my changes.
  • I've written tests against my changes and all the current present tests are passing.

Current behaviour

The overall build and run pipelines are a mess, both for this and the snapshotter. projects.json file being created and populated at run time is a hacky way to merge configuration sources. Similarily, the docker image does not have a default entrypoint, but does expect a very specific command in order to run at all, which is instead defined in the docker-compose.yaml manifest under the command service fields.

New expected behaviour

This is a small PR that aims to make the docker image a little easier to work with outside of the provided docker-compose from the snapshotter repo.

Change logs

  • The creation of config/settings.json is now in the Dockerfile instead of the snapshotter_autofill.sh script, which shouldn't break the overall command chain but would make it possible for someone to mount a custom settings.json file at runtime and is overall better practice since that settings file is simply a default that is common to all container images
  • Renaming init_processes.sh to docker-entrypoint.sh, which is a standard name easier to work with from the outside
  • Wrapping the execution of snapshotter_autofill.sh inside of the newly renamed docker-entrypoint.sh, again making it easier to work with the container outside of the provided docker-compose
  • Adding an ENTRYPOINT to the Dockerfile to ensure correct default behavior

@guillheu
Copy link
Author

guillheu commented Sep 5, 2024

This is a joint PR with the snapshotter. That PR contains the changes to the docker-compose command.

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.

1 participant