-
Notifications
You must be signed in to change notification settings - Fork 11
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
Dockerize validate 556 #580
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only minor things
docker/Dockerfile
Outdated
ADD $VALIDATE_IMAGE_PATH /tmp/validate-bin.tar.gz | ||
RUN mkdir /opt/validate \ | ||
&& tar xzf /tmp/validate-bin.tar.gz -C /opt/validate --strip-components 1 \ | ||
&& rm -f /tmp/validate-bin.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding apt-get remove --purge
and/or rm -rf /var/lib/apt/lists/*
as a final clean-up step to make the image smaller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works for me, besides @nutjob4life comments.
As a side thought I am wondering how the volumes are going to be actually mounted, like the checksum file should be on the same volume as the bundle itself (the archive, read-only), and the report will be written in user space. That will be for later and will depend on how validate will be upgrade to work on s3 and/or integrated in nucleus.
@tloubrieu-jpl, if we can safely assume that the checksum file should be on the same volume as the bundle itself, then we can reduce the number of volume parameters. |
@ramesh-maddegoda we cannot really assume anything about where the checksum file resides. additionally, that file is optional to begin with. |
@ramesh-maddegoda @nutjob4life just to confirm, we are a go for merge here? |
@jordanpadams , not yet. I am making few code improvements |
Refer to task #556
@jordanpadams and @nutjob4life , I incorporated all the review comments! Thanks! |
docker/run.sh
Outdated
VALIDATE_REPORT_FILE_NAME=validate-report.txt | ||
|
||
# Default arguments provided as an array. This can be updated based on the requirements. | ||
DEFAULT_ARGS=(/tmp/pds -M /tmp/pds/${CHECKSUM_MANIFEST_FILE_NAME} -r /tmp/validate-report/${VALIDATE_REPORT_FILE_NAME} -R pds4.bundle) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SC2206: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
βΉοΈ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ π Not relevant ] - [ π Won't fix ] - [ π Not critical, will fix ] - [ π Critical, will fix ] - [ π Critical, fixing now ]
docker/run.sh
Outdated
VALIDATE_REPORT_FILE_NAME=validate-report.txt | ||
|
||
# Default arguments provided as an array. This can be updated based on the requirements. | ||
DEFAULT_ARGS=(/tmp/pds -M /tmp/pds/${CHECKSUM_MANIFEST_FILE_NAME} -r /tmp/validate-report/${VALIDATE_REPORT_FILE_NAME} -R pds4.bundle) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SC2206: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
βΉοΈ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ π Not relevant ] - [ π Won't fix ] - [ π Not critical, will fix ] - [ π Critical, will fix ] - [ π Critical, fixing now ]
ποΈ Summary
This pull request is created to Dockerize the Validate tool. The docker image of Validate Tool provides an easy way to deploy the Validate Tool, without having to worry about the Java/JDK versions installed and operating systems supported. Also, this helps to easily use the Validate Tool in other execution environments such as docker compose and Amazon ECS.
β»οΈ Related Issues
#556