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

Dockerize validate 556 #580

Merged
merged 6 commits into from
Dec 29, 2022
Merged

Dockerize validate 556 #580

merged 6 commits into from
Dec 29, 2022

Conversation

ramesh-maddegoda
Copy link
Contributor

πŸ—’οΈ 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

Copy link
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.

Only minor things

docker/Dockerfile Outdated Show resolved Hide resolved
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
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

docker/README.md Outdated Show resolved Hide resolved
docker/README.md Outdated Show resolved Hide resolved
docker/README.md Outdated Show resolved Hide resolved
docker/README.md Show resolved Hide resolved
Copy link
Member

@tloubrieu-jpl tloubrieu-jpl left a 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.

@ramesh-maddegoda
Copy link
Contributor Author

ramesh-maddegoda commented Dec 22, 2022

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.

@jordanpadams
Copy link
Member

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.

@jordanpadams
Copy link
Member

@ramesh-maddegoda @nutjob4life just to confirm, we are a go for merge here?

@ramesh-maddegoda
Copy link
Contributor Author

@ramesh-maddegoda @nutjob4life just to confirm, we are a go for merge here?

@jordanpadams , not yet. I am making few code improvements

@ramesh-maddegoda
Copy link
Contributor Author

@ramesh-maddegoda @nutjob4life just to confirm, we are a go for merge here?

@jordanpadams and @nutjob4life , I incorporated all the review comments! Thanks!

docker/run.sh Outdated Show resolved Hide resolved
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)
Copy link
Contributor

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)
Copy link
Contributor

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 Show resolved Hide resolved
docker/run.sh Show resolved Hide resolved
@jordanpadams jordanpadams merged commit 5adc430 into main Dec 29, 2022
@jordanpadams jordanpadams deleted the dockerize-validate-556 branch December 29, 2022 16:01
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.

4 participants