No commit activity in last 3 years
No release in over 3 years
Parses and markups Dockerfiles.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0
~> 4.0
>= 0
~> 3.0
 Project Readme

Rouge::Lexers::Docker

Description

Rouge lexer for Dockerfiles.

Features

Parses and markups Dockerfiles.

Examples

require 'rouge'
require 'rouge/lexers/docker'

dockerfile = ARGV.shift
abort 'USAGE: ruby rougify-dockerfile.rb DOCKERFILE' unless dockerfile

content = File.read(dockerfile)
lexer = Rouge::Lexers::Docker.new
lexed = lexer.lex(content)

formatter = Rouge::Formatters::Terminal256.new
# or formatter = Rouge::Formatters::HTML.new(wrap: false)
highlighted = formatter.format(lexed)
print highlighted

Requirements

Rouge gem.

Install

$ gem install rouge-lexers-docker

Copyright

Copyright (c) 2015 KITAITI Makoto

See COPYING.txt for details.