Skip to content

Added dockerfile and workflow to build Docker image with baked-in five-safes profile#136

Merged
douglowe merged 4 commits intodevelopfrom
135-add-release-triggered-github-actions-workflow-to-build-docker-image-with-baked-in-profiles
Mar 13, 2026
Merged

Added dockerfile and workflow to build Docker image with baked-in five-safes profile#136
douglowe merged 4 commits intodevelopfrom
135-add-release-triggered-github-actions-workflow-to-build-docker-image-with-baked-in-profiles

Conversation

@EttoreM
Copy link
Contributor

@EttoreM EttoreM commented Mar 8, 2026

Closes #135

Added dockerfile and workflow to build Docker image with baked-in profiles when releasing new version of Cratey-Validator.

…files when releasing new version of Cratey-Validator
Copy link
Collaborator

@douglowe douglowe left a comment

Choose a reason for hiding this comment

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

I've added a couple of comments below. I'd like us to make this build specific to five-safes rocrates, so the naming should reflect this. Also we need to make sure to copy across a tagged release of our five-safes profile, so that we can in future say which exact version of the profile this will test against.

…file version is accessible through a label () or as an environment variable from inside the Docker image ().
@EttoreM EttoreM requested a review from douglowe March 12, 2026 08:27
@EttoreM EttoreM changed the title Added dockerfile and workflow to build Docker image with baked-in profiles Added dockerfile and workflow to build Docker image with baked-in five-safes profile Mar 12, 2026
Copy link
Collaborator

@douglowe douglowe left a comment

Choose a reason for hiding this comment

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

I've added a note regarding changing the location that the profile is extracted to.

On a broader compatibility note, I've tested building this container, and found that the five safes rocrate profile isn't compatible with the rocrate validator version in this container.

When I try to list the profiles I get the following error:

│ /usr/local/lib/python3.11/site-packages/rocrate_validator/profiles/five-safes-crate/must/15_meta │
│ data_file.py:17 in <module>                                                                      │
│                                                                                                  │
│   14                                                                                             │
│   15 import re                                                                                   │
│   16                                                                                             │
│ ❱ 17 import rocrate_validator.log as logging                                                     │
│   18 from rocrate_validator.models import Severity, ValidationContext                            │
│   19 from rocrate_validator.requirements.python import PyFunctionCheck, check, requirement       │
│   20                                                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ModuleNotFoundError: No module named 'rocrate_validator.log'

Do we need to import rocrate_validator.log in this file? Is this an error that has already been fixed? If so we should make a new release which includes the fix.

@EttoreM
Copy link
Contributor Author

EttoreM commented Mar 13, 2026

I've added a note regarding changing the location that the profile is extracted to.

On a broader compatibility note, I've tested building this container, and found that the five safes rocrate profile isn't compatible with the rocrate validator version in this container.

When I try to list the profiles I get the following error:

│ /usr/local/lib/python3.11/site-packages/rocrate_validator/profiles/five-safes-crate/must/15_meta │
│ data_file.py:17 in <module>                                                                      │
│                                                                                                  │
│   14                                                                                             │
│   15 import re                                                                                   │
│   16                                                                                             │
│ ❱ 17 import rocrate_validator.log as logging                                                     │
│   18 from rocrate_validator.models import Severity, ValidationContext                            │
│   19 from rocrate_validator.requirements.python import PyFunctionCheck, check, requirement       │
│   20                                                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ModuleNotFoundError: No module named 'rocrate_validator.log'

Do we need to import rocrate_validator.log in this file? Is this an error that has already been fixed? If so we should make a new release which includes the fix.

Lline 17 of rocrate_validator/profiles/five-safes-crate/must/15_metadata_file.py in the current version of rocrate-validator on the develop branch shows this:

import rocrate_validator.utils.log as logging

I will create a new release of the crate-validator

@EttoreM EttoreM requested a review from douglowe March 13, 2026 08:43
Copy link
Collaborator

@douglowe douglowe 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 now. Thanks for getting this sorted!

@douglowe douglowe merged commit 7697b5e into develop Mar 13, 2026
2 checks passed
@EttoreM EttoreM deleted the 135-add-release-triggered-github-actions-workflow-to-build-docker-image-with-baked-in-profiles branch March 13, 2026 10:32
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.

Add release-triggered GitHub Actions workflow to build Docker image with baked-in profiles

2 participants