Skip to content
This repository has been archived by the owner on Mar 18, 2023. It is now read-only.

gbevan/dockerfile-syntax-highlighter

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Dockerfile Syntax Highlighter

Brackets syntax highlighter for Dockerfiles.

Includes highlighting of nested shell scripts on the RUN and CMD directives.

Uses Jacob Lexical Tokenizer under the hood.

Screenshots

Highlighting FROM and MAINTAINER:

FROM MAINTAINER Screenshot

Syntax highlighting embedded Shell (applies to RUN and CMD directives):

RUN Shell Screenshot

Highlighting EXPOSEd ports:

RUN Shell Screenshot

enjoy!

Developing

If you want to further develop this extension, feel free to fork it on GitHub.

You will need the jacob Lexical Tokenizer installed:

$ npm install --save jacob

To generate the lexer, run:

$ node node_modules/.bin/jacob -t Dockerfile.jacoblex -l dockerlex.js

or just run:

$ ./build.sh

which generates the lexer and zip's up the extension for release.

Also, there is a blog on how this extension was written at reapingzombies4funandprofit.