Skip to content

Add Dockerfile #99

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

Merged
merged 1 commit into from
Jul 29, 2020
Merged

Add Dockerfile #99

merged 1 commit into from
Jul 29, 2020

Conversation

MarkTiedemann
Copy link
Contributor

Had to diagnose an issue with my GithubPages site, but didn't have ruby installed (and it seemed kinda annoying to install ruby on Windows), so I created this Dockerfile.

If you build the image (docker build .), you can run a check for any site with a single command (docker run <imageId> <siteUrl>) and get the results back as JSON.

Ideally, however, you wouldn't have to build this yourself, but could run it directly from DockerHub, for example: docker run github/pages-health-check <siteUrl>

Are you guys interested in adding this? 🙂

Copy link
Contributor

@parkr parkr left a comment

Choose a reason for hiding this comment

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

Neat!

@@ -0,0 +1,6 @@
FROM ruby:2.5.1-alpine3.7
RUN apk add --update --no-cache build-base libcurl \
&& gem install github-pages-health-check \
Copy link
Contributor

Choose a reason for hiding this comment

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

In this case, it would be most helpful if we bundled the repository instead of running gem install. Better for testing.

&& gem install github-pages-health-check \
&& apk del build-base \
&& echo "require 'github-pages-health-check'; puts GitHubPages::HealthCheck::Site.new(ARGV[0]).to_json" > to_json.rb
ENTRYPOINT [ "ruby", "to_json.rb" ]
Copy link
Contributor

Choose a reason for hiding this comment

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

ruby -r github-pages-health-check <file> could work here and make the file smaller.

@mjkatgithub
Copy link

and it seemed kinda annoying to install ruby on Windows

I have installed the linux subsystem on a windows, used the bash to install asdf-vm and finaly installed ruby via asdf-vm 😂

I would love to see this merged!

@parkr parkr merged commit 130e72f into github:master Jul 29, 2020
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.

3 participants