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

Add dockerfile #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

roipoussiere
Copy link

This PR adds a Dockerfile based on Alpine.

A ronn Dockerfile is useful for Continuous Integration tools (such as GitLab CI), to automatically generate a man page during a build process.

This Dockerfile is currently hosted on Docker hub. If this PR is merged, I can transfer ownship to an other Docker hub user or organization.

Usage

I recommend to use this container with stdin and stdout, in this way we don't have to deal with Docker volumes.

Saving ./my_program.1.ronn manpage to ./my_program.1:

docker run --rm -i roipoussiere/ronn --roff --pipe < ./my_program.1.ronn > ./my_program.1

Saving ./my_program.1.ronn html manpage to ./my_program.1.html:

docker run --rm -i roipoussiere/ronn --html --pipe < ./my_program.1.ronn > ./my_program.1.html

Usage in CI

The image entrypoint must be overridden in your CI tool. For instance, if GitLab CI is used, the .gitlab-ci.yml could look like this:

man:
  image:
    name: roipoussiere/ronn
    entrypoint: ["/bin/sh", "-c"]
  script:
    - ronn --roff --pipe ./my_script.1.ronn > ./my_script.1.ronn
    - ronn --html --pipe ./my_script.1.ronn > ./my_script.1.html

@apjanke
Copy link
Owner

apjanke commented Jul 16, 2020

Could you rebase on master? I think that'll fix the Travis CI build failure.

This seems like a good idea, but I have basically no expertise with Docker, so I don't know how to evaluate it. Can you point me at some doco that would get me familiar enough with Docker, Docker Hub, and its interaction with Travis CI so that I could evaluate this?

@roipoussiere
Copy link
Author

Here is the docs: https://docs.docker.com/

@apjanke
Copy link
Owner

apjanke commented Dec 22, 2020

Okay, I've got a bit of experience with Docker now, and I've cleaned up the spurious failures in Travis CI for real (I think). Would you mind rebasing this on master again to see if it runs clean now?

@apjanke apjanke self-assigned this Dec 22, 2020
@apjanke apjanke added the enhancement New feature or request label Dec 22, 2020
@apjanke apjanke added this to Low priority in ronn-ng Dec 22, 2020
@guenhter guenhter mentioned this pull request Feb 13, 2023
@guenhter
Copy link

@roipoussiere Do you mind to rebase again?

@@ -0,0 +1,6 @@
FROM ruby:alpine

Choose a reason for hiding this comment

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

In my experience, it is not the best way to use such a generic image without any version information. Maybe it is better to use a more concrete image tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Low priority
ronn-ng
  
Low priority
Development

Successfully merging this pull request may close these issues.

None yet

3 participants