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

FFS-1729: Add dockerfile to the application #68

Merged
merged 5 commits into from
Oct 5, 2024
Merged

Conversation

YvetteWhiteUSDS
Copy link
Collaborator

Ticket number

FFS-1729

Overview of changes

Dockerfile

A Dockerfile was created so that a docker image containing the application can be used locally and, ultimately, registered and deployed.

It is important to note that the testing libraries have a dependency on the open-source chromium browser. However, hardware with ARM64 architecture (i.e., some macbooks) will not have chromium. This is a known issue that can be resolved by setting the PUPPETEER_SKIP_CHROMIUM_DOWNLOAD flag to false when building the docker image on ARM64 hardware to force the install of chromium.

README

Instructions were added to the README to guide readers through the building an image and then running it. The local development instructions were also expanded to be more specific. Some minor rearrangement of the content was done to group like content.

Testing

Screenshot 2024-10-03 at 11 08 20 PM

Copy link
Collaborator

@kategreenUSDS kategreenUSDS left a comment

Choose a reason for hiding this comment

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

i'm approving but i trust you to use your best judgment on how to approach potential failure states with the chromium issue

# ARM64 architecture (i.e., Apple Silicon). Set a flag to skip the chromium
# download unless the current architecture is ARM64.
#
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
Copy link
Collaborator

Choose a reason for hiding this comment

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

you laid this out in the PR notes. do you want to default this to true or false? which is least risky? are you sure that skipping the download will result in successful cases even if the user doesn't match your test on line 17?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I defaulted this to true based on the examples I saw when researching this issue. With that said, it makes sense to me. When building the image on our laptops, we know that our macs use arm64. But, the architecture for running the github actions (which will also build the image) will likely not be arm64. Regardless, the if/then logic check has to happen to flip the skip switch whether or not the ENV var is initialized to true or false.

Reference: puppeteer/puppeteer#7740


### Running the application in a docker container

##### Prerequisite steps
Copy link
Collaborator

Choose a reason for hiding this comment

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

for the PUPPETEER workaround, do you want to reference that here just in case people run into some unexpected failure state with it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Readme updated.

@YvetteWhiteUSDS YvetteWhiteUSDS merged commit 264fca9 into main Oct 5, 2024
3 checks passed
@YvetteWhiteUSDS YvetteWhiteUSDS deleted the 1729-dockerize branch October 5, 2024 03:20
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