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

Update dockerfile with pa11y-ci #7

Merged
merged 2 commits into from
May 2, 2018
Merged

Conversation

tjheffner
Copy link
Contributor

also removed some lines that are now included by default in the base alekzonder/puppeteer:1 image

also removed some lines that are now included by default in the base alekzonder/puppeteer:1 image
This was referenced May 1, 2018
Copy link
Contributor

@grayside grayside left a comment

Choose a reason for hiding this comment

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

Overall looking good. I have a couple minor tweaks I'd like to see taken care of.

&& mkdir -p /home/pptruser/Downloads \
&& chown -R pptruser:pptruser /home/pptruser \
&& chown -R pptruser:pptruser /screenshots \
&& chown -R pptruser:pptruser /usr/local/share/.config/yarn/global/node_modules
Copy link
Contributor

Choose a reason for hiding this comment

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

By dropping these permissions, can the pptuser still take screenshots?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe so, but I have not tested the screenshot capability myself. These permissions are now included in the starting dockerfile here: https://hub.docker.com/r/alekzonder/puppeteer/~/dockerfile/

Dockerfile Outdated
&& chown -R pptruser:pptruser /screenshots \
&& chown -R pptruser:pptruser /usr/local/share/.config/yarn/global/node_modules
RUN yarn global add pa11y@5
RUN yarn global add pa11y-ci@2
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have one of the following to minimize the number of layers?

RUN yarn global add pa11y@5 pa11y-ci@2

or

RUN yarn global add pa11y@5 && yarn global add pa11y-ci@2

Also, is it the case we need to explicitly add pa11y? We can't invoke it if it's a dependency of pa11y-ci?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have confirmed that pa11y needs to be explicitly added. If pa11y-ci gets added globally, that doesn't give access to pa11y globally

Dockerfile Outdated

USER pptruser

ENTRYPOINT ["dumb-init", "--", "pa11y"]
ENTRYPOINT ["dumb-init", "--"]
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the flexibility here, but if we remove pa11y as part of the entrypoint, the -h flag in command will be an error.

I think we'll need to remove the CMD statement entirely.

This approach leaves us with:

docker run --rm outrigger/pa11y pa11y <url>

or

docker run --rm outrigger/pa11y pa11y-ci

a bit redundant, but we can work with that.

Copy link
Contributor

Choose a reason for hiding this comment

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

From sidebar chat, maybe CMD should be "bash -c"?

@grayside grayside merged commit 8db57cb into phase2:master May 2, 2018
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