" dockerfile.vim - Syntax highlighting for Dockerfiles
" Maintainer:   Honza Pokorny <https://honza.ca>
" Version:      0.5


if exists("b:current_syntax")
    finish
endif

let b:current_syntax = "dockerfile"

syntax case ignore

syntax match dockerfileKeyword /\v^\s*(ONBUILD\s+)?(ADD|CMD|ENTRYPOINT|ENV|EXPOSE|FROM|MAINTAINER|RUN|USER|LABEL|VOLUME|WORKDIR|COPY|STOPSIGNAL)\s/
highlight link dockerfileKeyword Keyword

syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
highlight link dockerfileString String

syntax match dockerfileComment "\v^\s*#.*$"
highlight link dockerfileComment Comment

set commentstring=#\ %s

" match "RUN", "CMD", and "ENTRYPOINT" lines, and parse them as shell
let s:current_syntax = b:current_syntax
unlet b:current_syntax
syntax include @SH syntax/sh.vim
let b:current_syntax = s:current_syntax
syntax region shLine matchgroup=dockerfileKeyword start=/\v^\s*(RUN|CMD|ENTRYPOINT)\s/ end=/\v$/ contains=@SH
" since @SH will handle "\" as part of the same line automatically, this "just works" for line continuation too, but with the caveat that it will highlight "RUN echo '" followed by a newline as if it were a block because the "'" is shell line continuation...  not sure how to fix that just yet (TODO)

" dockerfile.vim - Syntax highlighting for Dockerfiles
" Maintainer:   Honza Pokorny <https://honza.ca>
" Version:      0.5


if exists("b:current_syntax")
    finish
endif

let b:current_syntax = "dockerfile"

syntax case ignore

syntax match dockerfileKeyword /\v^\s*(ONBUILD\s+)?(ADD|CMD|ENTRYPOINT|ENV|EXPOSE|FROM|MAINTAINER|RUN|USER|LABEL|VOLUME|WORKDIR|COPY|STOPSIGNAL|ARG)\s/
highlight link dockerfileKeyword Keyword

syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
highlight link dockerfileString String

syntax match dockerfileComment "\v^\s*#.*$"
highlight link dockerfileComment Comment

set commentstring=#\ %s

" match "RUN", "CMD", and "ENTRYPOINT" lines, and parse them as shell
let s:current_syntax = b:current_syntax
unlet b:current_syntax
syntax include @SH syntax/sh.vim
let b:current_syntax = s:current_syntax
syntax region shLine matchgroup=dockerfileKeyword start=/\v^\s*(RUN|CMD|ENTRYPOINT)\s/ end=/\v$/ contains=@SH
" since @SH will handle "\" as part of the same line automatically, this "just works" for line continuation too, but with the caveat that it will highlight "RUN echo '" followed by a newline as if it were a block because the "'" is shell line continuation...  not sure how to fix that just yet (TODO)

Add `ARG` instruction syntax for vim
Add `ARG` instruction syntax for vim

Signed-off-by: Koichi Shiraishi <13fbd79c3d390e5d6585a21e11ff5ec1970cff0c@zchee.io>

docker-zh/docker.github.io,michelvocks/docker,gigidwan/docker,nawawi/docker,ajaymdesai/docker,xiaods/docker,anweiss/docker.github.io,abhinavdahiya/docker,carolfh/docker,allencloud/docker,mbanikazemi/docker,ncdc/docker,anujbahuguna/docker,rkazak/docker,dccurtis/docker,lixiaobing1/docker,mkumatag/docker,tmp6154/docker,imeoer/hypercli,mikedougherty/docker,michelvocks/docker,ffoysal/docker,gnailuy/docker,londoncalling/docker.github.io,jhorwit2/docker,nalind/docker,kojiromike/docker,estesp/docker,cyli/docker,bearstech/moby,ColinHebert/docker,jameszhan/docker,JimGalasyn/docker.github.io,PatrickLang/moby,laijs/docker,djs55/docker,hypriot/docker,inatatsu/docker,solganik/docker,rhatdan/storage,charleswhchan/docker,luxas/docker,medallia/docker,splunk/docker,rremer/moby,BenHall/docker,yosifkit/docker,asbjornenge/docker,mohmost12/docker,cpuguy83/docker,TheBigBear/docker,yp-engineering/docker,denverdino/denverdino.github.io,jc-m/docker,konstruktoid/docker-1,erikh/docker,maxamillion/docker,diogomonica/docker,jameszhan/docker,hallyn/docker,bonczj/moby-json-file-logger,LuisBosquez/docker.github.io,portworx/docker,projectatomic/docker,SvenDowideit/docker,liaoqingwei/docker,arun-gupta/docker,cloudflare/docker,LaynePeng/docker,menglingwei/denverdino.github.io,Mashimiao/docker,tklauser/docker,djs55/docker,rillig/docker.github.io,naveed-jamil-tenpearls/moby,fcrisciani/docker,bearstech/moby,Altiscale/docker,paralin/docker,gao-feng/docker,denverdino/denverdino.github.io,shin-/docker.github.io,PatrickLang/moby,noironetworks/docker,icaoweiwei/docker,erikh/docker,jlhawn/docker,jimjag/docker,sheimi/docker,Shopify/docker,alexisbellido/docker.github.io,srust/docker,ibuildthecloud/docker,xuxinkun/docker,13W/docker,londoncalling/docker.github.io,harche/docker,ivansaracino/docker,willmtemple/docker,moul/docker,BrianBland/docker,shin-/docker.github.io,kencochrane/docker,gigidwan/docker,sallyom/docker,gnailuy/docker,konstruktoid/docker-upstream,phiroict/docker,joaofnfernandes/docker.github.io,gdevillele/docker.github.io,coolljt0725/docker,dmcgowan/docker,phiroict/docker,SaiedKazemi/docker,stainboy/docker,dmcgowan/docker,johnstep/docker.github.io,johnstep/moby-moby,Jimmy-Xu/hypercli,tpounds/docker,mikebrow/docker,vdemeester/docker,JimGalasyn/docker.github.io,jloehel/docker,prertik/docker,darrenstahlmsft/docker,dnephin/docker,lixiaobing10051267/docker,alexisbellido/docker.github.io,amatsus/docker,dperny/docker,jimjag/docker,kolyshkin/moby,gdevillele/docker.github.io,duglin/docker,aidanhs/docker,x1022as/docker,coreos/docker,denverdino/docker.github.io,abhinavdahiya/docker,moul/docker,mtanlee/docker,mtrmac/docker,geekylucas/docker,mtrmac/docker,kimh/docker,thtanaka/docker,jc-m/docker,jlhawn/docker,jlebon/docker,Tenk42/docker,dsau/docker,sdurrheimer/docker,bonczj/moby-json-file-logger,asbjornenge/docker,TrumanLing/docker,shubheksha/docker.github.io,joeuo/docker.github.io,allencloud/docker,mathewkoshy493/docker,gschaetz/moby,docker/docker,LaynePeng/docker,brahmaroutu/docker,JimGalasyn/docker.github.io,KarthikNayak/docker,ckeyer/docker,hqhq/moby,docker-zh/docker.github.io,nigelpoulton/docker,harche/docker,denverdino/docker.github.io,sallyom/docker,noxiouz/docker,yosifkit/docker,docker-zh/docker.github.io,aduermael/docker.github.io,liaoqingwei/docker,londoncalling/docker.github.io,KarthikNayak/docker,gschaetz/moby,akira-baruah/docker,ivansaracino/docker,qudongfang/docker,HuKeping/docker,gnailuy/docker,jthelin/docker,cpuguy83/docker,yp-engineering/docker,nawawi/docker,pyotr777/docker,bearstech/moby,kojiromike/docker,unclejack/docker,konstruktoid/docker-1,tmp6154/docker,diogomonica/docker,sfsmithcha/docker,umerazad/docker,moby/moby,lixiaobing10051267/docker,fsoppelsa/docker,moypray/docker,pramodhkp/moby,LuisBosquez/docker.github.io,mbanikazemi/docker,cyli/docker,noironetworks/docker,runcom/docker,geekylucas/docker,dims/docker,cr7pt0gr4ph7/docker,hqhq/moby,maxamillion/docker,achanda/docker,kencochrane/docker,rhatdan/docker,gnailuy/docker,13W/docker,justincormack/docker,resin-io/docker,coreos/docker,tkopczynski/docker,bonczj/moby-json-file-logger,sean-jc/docker,docker/docker,ailispaw/docker,contiv/docker,isubuz/docker,dnephin/docker,Shopify/docker,coolljt0725/docker,miminar/docker,ZJU-SEL/docker,kerneltime/docker,bdwill/docker.github.io,darrenstahlmsft/moby,cloudflare/docker,izarov/docker,wenchma/docker,pyotr777/docker,yp-engineering/docker,icecrime/docker,SvenDowideit/docker,hyperhq/hypercli,sanscontext/docker.github.io,bfirsh/docker,mahak/docker,charleszheng44/moby,jzwlqx/denverdino.github.io,troy0820/docker.github.io,q384566678/docker,HideoYamauchi/docker,nghiant2710/docker,sanscontext/docker.github.io,darrenstahlmsft/docker,inatatsu/docker,fsoppelsa/docker,Mashimiao/docker,trebonian/docker,erikh/docker,HuKeping/docker,tkopczynski/docker,tklauser/docker,rhatdan/storage,achanda/docker,thaJeztah/docker.github.io,sallyom/docker,YujiOshima/docker,jecarey/docker,mike1729/docker,rhatdan/docker,laijs/moby,yasiramin10p/moby,aduermael/docker.github.io,gigidwan/docker,dongjoon-hyun/docker,justyntemme/docker,twaugh/docker,Altiscale/docker,erikstmartin/docker,HackToday/docker,haveatry/docker,ajaymdesai/docker,troy0820/docker.github.io,sterchelen/docker,icaoweiwei/docker,tkopczynski/docker,rhardih/docker,kyle-wang/docker,LuisBosquez/docker.github.io,menglingwei/denverdino.github.io,srust/docker,projectatomic/docker,flavio/docker,nalind/docker,mtanlee/docker,asbjornenge/docker,rkazak/docker,x1022as/docker,Mokolea/docker,Ramzec/docker,mixja/docker,troy0820/docker.github.io,bluebreezecf/docker,containers/storage,supasate/docker,docker/docker,lixiaobing1/docker,estesp/docker,aidanhs/docker,SaiedKazemi/docker,fsoppelsa/docker,thaJeztah/docker,YuPengZTE/docker,YujiOshima/docker,bdwill/docker.github.io,runcom/docker,sean-jc/docker,hustcat/docker,nawawi/docker,mohmost12/docker,sheimi/docker,michael-holzheu/docker,aditirajagopal/docker,TheBigBear/docker,BSWANG/denverdino.github.io,jlebon/docker,vijaykilari/docker,mathewkoshy493/docker,tophj-ibm/docker,ndeloof/docker,nalind/docker,pyotr777/docker,moby/moby,brahmaroutu/docker,danix800/docker.github.io,michael-holzheu/docker,raja-sami-10p/moby,fangyuan930917/docker,ivansaracino/docker,wenchma/docker,dccurtis/docker,sterchelen/docker,icaoweiwei/docker,moul/docker,docker/docker.github.io,mixja/docker,ColinHebert/docker,icecrime/docker,KingEmet/docker,mahak/docker,Mokolea/docker,tonistiigi/docker,madhanrm/docker,justincormack/docker,jthelin/docker,kimh/docker,portworx/docker,srust/docker,cnaize/docker,Ramzec/docker,joaofnfernandes/docker.github.io,toli/docker,sanscontext/docker.github.io,trebonian/docker,catinthesky/docker,bdwill/docker.github.io,johnstep/docker.github.io,sunyuan3/docker,raja-sami-10p/moby,supasate/docker,TrumanLing/docker,dsheets/moby,haveatry/docker,thaJeztah/docker.github.io,kunalkushwaha/docker,denverdino/denverdino.github.io,portworx/docker,tophj-ibm/moby,fcrisciani/docker,stevvooe/docker,jzwlqx/denverdino.github.io,mkumatag/docker,dccurtis/docker,bluebreezecf/docker,laijs/moby,imkin/moby,yongtang/docker,konstruktoid/docker-upstream,docker-zh/docker.github.io,jvanz/docker,mkumatag/docker,gjaskiewicz/moby,naveed-jamil-tenpearls/moby,johnstep/docker.github.io,fangyuan930917/docker,mtesselH/docker,noironetworks/docker,OnePaaS/docker,rremer/moby,ibuildthecloud/docker,whuwxl/docker,Mashimiao/docker,shishir-a412ed/docker,HideoYamauchi/docker,q384566678/docker,kolyshkin/moby,JimGalasyn/docker.github.io,AkihiroSuda/docker,maxamillion/docker,sean-jc/docker,solganik/docker,upmio/docker,allencloud/docker,scollier/docker,denverdino/docker.github.io,fangyuan930917/docker,dmcgowan/docker,hyperhq/hypercli,vijaykilari/docker,crosbymichael/docker,jlhawn/docker,laijs/docker,cr7pt0gr4ph7/docker,kencochrane/docker,ailispaw/docker,ndeloof/docker,hqhq/moby,sdurrheimer/docker,shishir-a412ed/docker,nigelpoulton/docker,paralin/docker,qudongfang/docker,zhangjianfnst/docker,duglin/docker,cnaize/docker,twaugh/docker,tonistiigi/docker,mtrmac/docker,sunyuan3/docker,mohmost12/docker,OnePaaS/docker,Altiscale/docker,thtanaka/docker,tagomoris/docker,toli/docker,shubheksha/docker.github.io,danyalKhaliq10p/moby,thaJeztah/docker,aidanhs/docker,ndeloof/docker,londoncalling/docker.github.io,haveatry/docker,hypriot/docker,jlebon/docker,AkihiroSuda/docker,dims/docker,achanda/docker,docker/docker.github.io,OnePaaS/docker,mikebrow/docker,ZJUshuaizhou/docker,bdwill/docker.github.io,pecameron/docker,kyle-wang/docker,ripcurld0/moby,KingEmet/docker,mahak/docker,upmio/docker,HideoYamauchi/docker,moby/moby,michelvocks/docker,BrianBland/docker,13W/docker,mtanlee/docker,toli/docker,rkazak/docker,dgageot/docker,ZJUshuaizhou/docker,danix800/docker.github.io,bdwill/docker.github.io,amatsus/docker,cyli/docker,AkihiroSuda/docker,jwhonce/docker,zhangjianfnst/docker,gjaskiewicz/moby,nigelpoulton/docker,joaofnfernandes/docker.github.io,hyperhq/hypercli,JMesser81/docker,ColinHebert/docker,flavio/docker,umerazad/docker,phiroict/docker,arun-gupta/docker,raja-sami-10p/moby,danix800/docker.github.io,errordeveloper/docker,Mokolea/docker,msabansal/docker,menglingwei/denverdino.github.io,aduermael/docker.github.io,cpuguy83/docker,dongjoon-hyun/docker,ffoysal/docker,nawawi/docker,jimjag/docker,dsau/docker,laijs/moby,eskaaren/docker,ailispaw/docker,pradipd/moby,docker/docker.github.io,TheBigBear/docker,medallia/docker,nghiant2710/docker,JeffBellegarde/docker,KarthikNayak/docker,xuxinkun/docker,johnstep/moby-moby,tpounds/docker,paralin/docker,jwhonce/docker,ncdc/docker,denverdino/docker.github.io,docker/docker.github.io,ibuildthecloud/docker,crosbymichael/docker,Syntaxide/docker,inatatsu/docker,danyalKhaliq10p/moby,johnstep/moby-moby,rhatdan/docker,cr7pt0gr4ph7/docker,Ramzec/docker,BrianBland/docker,yasiramin10p/moby,dsheets/moby,eskaaren/docker,shubheksha/docker.github.io,shin-/docker.github.io,pradipd/moby,brahmaroutu/docker,yasiramin10p/moby,charleszheng44/moby,HackToday/docker,darrenstahlmsft/docker,joeuo/docker.github.io,danix800/docker.github.io,thtanaka/docker,jecarey/docker,Microsoft/docker,menglingwei/denverdino.github.io,zhuguihua/docker,noxiouz/docker,thaJeztah/docker.github.io,jwhonce/docker,izarov/docker,miminar/docker,jzwlqx/denverdino.github.io,x1022as/docker,YuPengZTE/docker,anujbahuguna/docker,rhardih/docker,cyphar/docker,upmio/docker,davinashreddy/docker,amatsus/docker,projectatomic/docker,geekylucas/docker,justyntemme/docker,DoraALin/docker,tophj-ibm/moby,carolfh/docker,cloudflare/docker,sarnautov/moby,isubuz/docker,mstanleyjones/docker,zhangjianfnst/docker,diogomonica/docker,stevvooe/docker,mgoelzer/docker,Morsicus/docker,runcom/docker,nghiant2710/docker,davinashreddy/docker,cmehay/docker-1,jloehel/docker,phiroict/docker,liaoqingwei/docker,unclejack/docker,xiekeyang/docker,supasate/docker,BenHall/docker,imeoer/hypercli,mssola/docker,kimh/docker,konstruktoid/docker-upstream,justyntemme/docker,pecameron/docker,rillig/docker.github.io,cyphar/docker,Tenk42/docker,eskaaren/docker,scotttlin/docker,JimGalasyn/docker.github.io,ncdc/docker,erikstmartin/docker,phiroict/docker,sanjeo/docker,jc-m/docker,Microsoft/docker,catinthesky/docker,prertik/docker,vdemeester/docker,madhanrm/docker,prertik/docker,ffoysal/docker,containers/storage,sunyuan3/docker,denverdino/denverdino.github.io,resin-io/docker,xiekeyang/docker,BSWANG/denverdino.github.io,Mokolea/docker,konstruktoid/docker-upstream,dgageot/docker,johnstep/docker.github.io,dims/docker,rillig/docker.github.io,YuPengZTE/docker,KingEmet/docker,nguyentm83/docker,yummypeng/docker,mikedougherty/docker,mssola/docker,crosbymichael/docker,ripcurld0/moby,moby/moby,14rcole/docker,BenHall/docker,danyalKhaliq10p/moby,fcrisciani/docker,afein/docker,kolyshkin/docker,carolfh/docker,bfirsh/docker,whuwxl/docker,shishir-a412ed/docker,mgoelzer/docker,akira-baruah/docker,willmtemple/docker,darrenstahlmsft/moby,moypray/docker,Jimmy-Xu/hypercli,JeffBellegarde/docker,ckeyer/docker,yongtang/docker,estesp/docker,shhsu/docker,dsau/docker,sanscontext/docker.github.io,mtesselH/docker,lixiaobing1/docker,moxiegirl/docker,mathewkoshy493/docker,qudongfang/docker,Morsicus/docker,gdevillele/docker.github.io,AkihiroSuda/docker,kojiromike/docker,HackToday/docker,bearstech/moby,sdurrheimer/docker,SaiedKazemi/docker,mikedougherty/docker,thaJeztah/docker.github.io,endophage/docker,14rcole/docker,Syntaxide/docker,abhinavdahiya/docker,zhuguihua/docker,joaofnfernandes/docker.github.io,thaJeztah/docker,errordeveloper/docker,anweiss/docker.github.io,imeoer/hypercli,nguyentm83/docker,gschaetz/moby,mbanikazemi/docker,rillig/docker.github.io,TrumanLing/docker,sarnautov/moby,pramodhkp/moby,rremer/moby,tianon/docker,moypray/docker,dnephin/docker,arun-gupta/docker,imkin/moby,scotttlin/docker,troy0820/docker.github.io,erikstmartin/docker,bfirsh/docker,q384566678/docker,LuisBosquez/docker.github.io,trebonian/docker,hypriot/docker,flavio/docker,kerneltime/docker,shubheksha/docker.github.io,mstanleyjones/docker,trebonian/docker,contiv/docker,cyphar/docker,resin-io/docker,ckeyer/docker,moxiegirl/docker,shin-/docker.github.io,Shopify/docker,endophage/docker,cmehay/docker-1,jloehel/docker,tklauser/docker,nalind/docker,solganik/docker,kyle-wang/docker,aduermael/docker.github.io,jimjag/docker,harche/docker,ibuildthecloud/docker,mtesselH/docker,sarnautov/moby,joaofnfernandes/docker.github.io,joeuo/docker.github.io,hustcat/docker,paralin/docker,michael-holzheu/docker,yummypeng/docker,mgoelzer/docker,errordeveloper/docker,BSWANG/denverdino.github.io,laijs/docker,JMesser81/docker,tpounds/docker,jameszhan/docker,PatrickLang/moby,jongiddy/docker,shhsu/docker,HuKeping/docker,YujiOshima/docker,tophj-ibm/moby,scollier/docker,anortef/docker,whuwxl/docker,kerneltime/docker,yummypeng/docker,ripcurld0/moby,pradipd/moby,gdevillele/docker.github.io,lixiaobing10051267/docker,hallyn/docker,dperny/docker,sterchelen/docker,dgageot/docker,POLJM242/docker,imkin/moby,jhorwit2/docker,endophage/docker,davinashreddy/docker,mike1729/docker,shubheksha/docker.github.io,jongiddy/docker,docker/docker.github.io,sanscontext/docker.github.io,gjaskiewicz/moby,kunalkushwaha/docker,vdemeester/docker,vijaykilari/docker,medallia/docker,sfsmithcha/docker,kunalkushwaha/docker,justincormack/docker,madhanrm/docker,hustcat/docker,docker-zh/docker.github.io,tmp6154/docker,Jimmy-Xu/hypercli,JeffBellegarde/docker,catinthesky/docker,shhsu/docker,icecrime/docker,alfred-landrum/docker,kolyshkin/docker,splunk/docker,mssola/docker,splunk/docker,dsheets/moby,alexisbellido/docker.github.io,SvenDowideit/docker,msabansal/docker,rancher/docker,konstruktoid/docker-1,LuisBosquez/docker.github.io,jzwlqx/denverdino.github.io,luxas/docker,jvanz/docker,gdevillele/docker.github.io,jzwlqx/denverdino.github.io,BSWANG/denverdino.github.io,tagomoris/docker,anortef/docker,johnstep/docker.github.io,contiv/docker,moul/docker,luxas/docker,Syntaxide/docker,skatsuta/docker,dongjoon-hyun/docker,thaJeztah/docker.github.io,anweiss/docker.github.io,Microsoft/docker,isubuz/docker,shin-/docker.github.io,anujbahuguna/docker,sanjeo/docker,xiekeyang/docker,xuxinkun/docker,Tenk42/docker,13W/docker,mstanleyjones/docker,charleszheng44/moby,Morsicus/docker,denverdino/denverdino.github.io,dperny/docker,skatsuta/docker,unclejack/docker,ajaymdesai/docker,ZJUshuaizhou/docker,gao-feng/docker,yongtang/docker,stainboy/docker,denverdino/docker.github.io,JMesser81/docker,alexisbellido/docker.github.io,scotttlin/docker,cnaize/docker,twaugh/docker,tophj-ibm/docker,pramodhkp/moby,LaynePeng/docker,duglin/docker,umerazad/docker,willmtemple/docker,yosifkit/docker,mahak/docker,joeuo/docker.github.io,flavio/docker,medallia/docker,alfred-landrum/docker,jongiddy/docker,coolljt0725/docker,tagomoris/docker,charleswhchan/docker,tophj-ibm/docker,tianon/docker,mike1729/docker,zhuguihua/docker,DoraALin/docker,msabansal/docker,naveed-jamil-tenpearls/moby,sheimi/docker,londoncalling/docker.github.io,jvanz/docker,BSWANG/denverdino.github.io,izarov/docker,ZJU-SEL/docker,cmehay/docker-1,rancher/docker,menglingwei/denverdino.github.io,skatsuta/docker,alfred-landrum/docker,coreos/docker,kolyshkin/moby,miminar/docker,ibuildthecloud/docker,djs55/docker,moxiegirl/docker,xiaods/docker,tonistiigi/docker,darrenstahlmsft/moby,xiaods/docker,afein/docker,bluebreezecf/docker,aditirajagopal/docker,noxiouz/docker,anweiss/docker.github.io,sfsmithcha/docker,jhorwit2/docker,joeuo/docker.github.io,pecameron/docker,cpuguy83/docker,Ramzec/docker,rhatdan/storage,charleswhchan/docker,hallyn/docker,alexisbellido/docker.github.io,mixja/docker,yosifkit/docker,wenchma/docker,stainboy/docker,aditirajagopal/docker,stevvooe/docker,DoraALin/docker,POLJM242/docker,afein/docker,13W/docker,containers/storage,anortef/docker,thaJeztah/docker,anweiss/docker.github.io,gao-feng/docker,mikebrow/docker,sanjeo/docker,rancher/docker