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 #110

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

Conversation

roipoussiere
Copy link

@roipoussiere roipoussiere commented Jul 10, 2020

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

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.

None yet

1 participant