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

Fix issues with Docker image/CI build #134

Merged
merged 4 commits into from
Sep 13, 2024

Conversation

easybe
Copy link
Collaborator

@easybe easybe commented Sep 12, 2024

Test run: https://github.com/UpstreamDataInc/goosebit/actions/runs/10834302334

$ docker buildx imagetools inspect upstreamdata/goosebit:gardena-eb-docker_test --format "{{ json .SBOM }}" | head
{
  "SPDX": {
    "SPDXID": "SPDXRef-DOCUMENT",
    "creationInfo": {
      "created": "2024-09-12T15:49:35Z",
      "creators": [
        "Organization: Anchore, Inc",
        "Tool: syft-v0.105.0",
        "Tool: buildkit-v0.15.2"
      ],

Without this change, the CI Docker image build may start (and fail)
before the new version of the package is actually installable with
`pip`.

Fixes: UpstreamDataInc#122
An invalid value was passed as `subject-name` because we were
referencing environment variables which obviously did not exist.
Anyway, `docker/build-push-action` supports pushing attestations as
well, so let's use that instead.

Fixes: UpstreamDataInc#122
We currently do not fully support multiple workers. For more info, see:
UpstreamDataInc#125

This configuration can be overridden by setting the `GUNICORN_CMD_ARGS`
environment variable.
This way, a mounted Docker volume will inherit the correct permissions.
@easybe easybe requested a review from b-rowan September 12, 2024 16:07
Copy link
Collaborator

@b-rowan b-rowan left a comment

Choose a reason for hiding this comment

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

Looks good to me. No idea why the docker volume wouldn't be writable by default, but this should fix it.

@b-rowan b-rowan merged commit 34fe28b into UpstreamDataInc:master Sep 13, 2024
2 checks passed
@easybe
Copy link
Collaborator Author

easybe commented Sep 13, 2024

Looks good to me. No idea why the docker volume wouldn't be writable by default, but this should fix it.

Because our service is not running as root (the default) you need to set file permissions explicitly. How could Docker know that your application wants to write to a certain directory?

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