scancode.io icon indicating copy to clipboard operation
scancode.io copied to clipboard

Build SCIO as a single, multiprocess image

Open pombredanne opened this issue 1 year ago • 2 comments

We have a pending merger of a PR for an AppImage to simplify running ScanCode.io as a command line application but it has a some limitations.

We should also build as a single image that runs all the processes that would then be runnable just using an plain container runner, not compose: this would be a simplified way to distribute and run in Ci/CD.

See https://pulpproject.org/pulp-in-one-container/ and https://docs.pulpproject.org/pulp_oci_images/multi-process-images/

Multi-Process Images These images are also known as "Single Container", or "Pulp in One Container". Each image runs all 3 Pulp services (pulp-api, pulp-content and pulp-worker), as well as Pulp's third-party services (nginx, postgresql and redis), in one single container. See https://github.com/pulp/pulp-oci-images

pombredanne avatar Oct 29 '23 09:10 pombredanne

And example of a single container Pulp deployment is at:

  • https://github.com/pulp/pulp-oci-images/blob/a85cc8fdba17ad5407956826e0b406cd4aeb27a7/images/pulp_ci_centos/Containerfile#L33

The base is there:

  • https://github.com/pulp/pulp-oci-images/blob/a85cc8fdba17ad5407956826e0b406cd4aeb27a7/images/Containerfile.core.base

They use CentOS as a base and S6 as a process manager/supervisor

  • https://github.com/just-containers/s6-overlay/
  • https://skarnet.org/software/s6/overview.html

and they run Python, Postgres, Redis, gunicorn, nginx, Django and more much like ScanCode.

@mikedep333 @gerrod3 your single container image for Pulp is pretty cool. Any objection that we reuse this? .... what is the license for the containerfiles and scripts in https://github.com/pulp/pulp-oci-images ? (if this can be Apache like here this would make our life easier, but any license will do)

pombredanne avatar Apr 30 '24 16:04 pombredanne

@pombredanne I believe all of the Pulp repositories should be under GPL-2: https://github.com/pulp/pulpcore?tab=GPL-2.0-1-ov-file#readme.

gerrod3 avatar May 09 '24 12:05 gerrod3