Skip to content

Add registry-loader-lite docker image, which is a simple passthrough …#54

Merged
tloubrieu-jpl merged 5 commits intomainfrom
docker-lite
Mar 19, 2026
Merged

Add registry-loader-lite docker image, which is a simple passthrough …#54
tloubrieu-jpl merged 5 commits intomainfrom
docker-lite

Conversation

@tloubrieu-jpl
Copy link
Copy Markdown
Member

…to call registry-loader tools

🗒️ Summary

Add a simplified docker image without the test logic.
This is used by the new registry deployment automation which handles the test logic.

🤖 AI Assistance Disclosure

  • No AI assistance used
  • AI used for light assistance (e.g., suggestions, refactoring, documentation help, minor edits)
  • AI used for moderate content generation (AI generated some code or logic, but the developer authored or heavily revised the majority)
  • AI generated substantial portions of this code

Estimated % of code influenced by AI: _50 %

⚙️ Test Data and/or Report

Used with PR NASA-PDS/registry#475

♻️ Related Issues

🤓 Reviewer Checklist

Reviewers: Please verify the following before approving this pull request.

Documentation and PR Content

  • Documentation: README, Wiki, or inline documentation (Sphinx, Javadoc, Docstrings) have been updated to reflect these changes.
  • Issue Traceability: The PR is linked to a valid GitHub Issue
  • PR Title: The PR title is "user-friendly" clearly identifying what is being fixed or the new feature being added, that if you saw it in the Release Notes for a tool, you would be able to get the gist of what was done.

Security & Quality

  • SonarCloud: Confirmed no new High or Critical security findings.
  • Secrets Detection: Verified that the Secrets Detection scan passed and no sensitive information (keys, tokens, PII) is exposed.
  • Code Quality: Code follows organization style guidelines and best practices for the specific language (e.g., PEP 8, Google Java Style).

Testing & Validation

  • Test Accuracy: Verified that test data is accurate, representative of real-world PDS4 scenarios, and sufficient for the logic being tested.
  • Coverage: Automated tests cover new logic and edge cases.
  • Local Verification: (If applicable) Successfully built and ran the changes in a local or staging environment.

Maintenance

  • Backward Compatibility: Confirmed that these changes do not break existing downstream dependencies or API contracts (or that breaking changes are clearly documented).

@tloubrieu-jpl tloubrieu-jpl requested a review from a team as a code owner March 15, 2026 23:31
Comment thread docker/DockerfileLite Outdated

# Install curl
RUN apt-get update -y
RUN apt-get install curl -y
Copy link
Copy Markdown
Member

@nutjob4life nutjob4life Mar 15, 2026

Choose a reason for hiding this comment

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

These two RUN commands can be combined into one with && and will save a layer in the image. (--yes? 😉)

Comment thread docker/DockerfileLite Outdated
# Set following arguments with compatible versions
ARG harvest_package_path=https://github.com/NASA-PDS/harvest/releases/download/v5.0.0/harvest-5.0.0-bin.tar.gz
ARG reg_manager_package_path=https://github.com/NASA-PDS/registry-mgr/releases/download/v6.0.0/registry-manager-6.0.0-bin.tar.gz
ARG test_data_url=https://pds.nasa.gov/data/pds4/test-data/registry/custom-datasets.tar.gz
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The test_data_url isn't used anywhere else in the DockerfileLite; can it be removed?

Comment thread docker/entrypoint-lite.sh Outdated
set -euo pipefail


exec "$@"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

First, this script has two "shebangs", #!? Shouldn't just one be necessary?

Also, since this script just does an exec of its argument, would it maybe be simpler to just have the ENTRYPOINT in the Dockerfile?

Actually, the README expects callers to provide the command directly, so there might not be a need for an ENTRYPOINT at all.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks @nutjob4life , that is an interesting simplification, that I will try.

Comment thread docker/README.md Outdated
Alternatively you can create a simplified docker image without the integration test logic which is preferred to be handled in the registry overarching repository.

```
docker image build -t nasapds/registry-loader-lite -f docker/DockerfileLite --build-arg harvest_package_path=harvest/target/harvest-5.0.0-SNAPSHOT-bin.tar.gz --build-arg reg_manager_package_path=manager/target/registry-manager-6.0.0-SNAPSHOT-bin.tar.gz .
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In READMEs, I prefer to see the --long form of command-line arguments like --tag and --file, since they're self-documenting. But that's just my personal taste; feel free to ignore this.

Comment thread docker/README.md Outdated

Call one of the registry-loader tools (registry-manager or harvest) using the following command. Below is an example to create a registry using the registry-manager tool:

docker run --rm -it -v {where your configuration files are}:/config nasapds/registry-loader-lite registry-manager create-registry -auth /config/es-admin-auth.cfg -registry file:///config/registry-connection.xml
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same thing here; --volume instead of -v, and docker container run to be extra-explicit.

Also: why is -it (interactive and tty) necessary? Does this require user interaction?

Comment thread docker/DockerfileLite Outdated
ADD $harvest_package_path /app/
ADD $reg_manager_package_path /app/
# One extraction step for all archives
RUN sh -c 'ls /app/*.tar.gz 2>/dev/null | grep -q . && for f in /app/*.tar.gz; do tar -xzf "$f" -C /app; done || echo "No .tar.gz files to extract"' \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are extra spaces after the \ meaning it's not a continuation line.

@sonarqubecloud
Copy link
Copy Markdown

@tloubrieu-jpl
Copy link
Copy Markdown
Member Author

Thanks @nutjob4life , I applied your change requests.

Copy link
Copy Markdown
Member

@nutjob4life nutjob4life left a comment

Choose a reason for hiding this comment

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

Looking good! 🎉

@tloubrieu-jpl tloubrieu-jpl merged commit efda8c0 into main Mar 19, 2026
2 of 3 checks passed
@tloubrieu-jpl tloubrieu-jpl deleted the docker-lite branch March 19, 2026 16:45
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