validate-dockerfile
Advanced tools
Comparing version 1.4.5 to 1.4.6
@@ -5,3 +5,3 @@ 'use strict'; | ||
var instructionsRegex = /^(CMD|FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD)(\s)?/i; | ||
var instructionsRegex = /^(CMD|FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD)(\s*)/i; | ||
@@ -23,3 +23,3 @@ // Some regexes sourced from: | ||
add: /^(~?[A-z0-9\/_.-]+|https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*))\s~?[A-z0-9\/_.-]+$/, | ||
volume: /^~?([A-z0-9\/_.-]+|\["[A-z0-9\/_.-]+"\])$/, | ||
volume: /^~?([A-z0-9\/_.-]+|\[(\s*)?("[A-z0-9\/_. -]+"(,\s*)?)+(\s*)?\])$/, | ||
workdir: /^~?[A-z0-9\/_.-]+$/ | ||
@@ -26,0 +26,0 @@ }; |
{ | ||
"name": "validate-dockerfile", | ||
"version": "1.4.5", | ||
"version": "1.4.6", | ||
"description": "Validates a Dockerfile", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -90,2 +90,10 @@ 'use strict'; | ||
describe('generic instructions', function() { | ||
describe('formatting', function() { | ||
it('should allow multiple spaces between command and params', expectsSuccess( | ||
'RUN kessel' | ||
)); | ||
}); | ||
}); | ||
describe('optional instructions', function () { | ||
@@ -193,2 +201,6 @@ describe('maintainer', function () { | ||
it('Should take a JSON array VOLUME with multiple items', expectsSuccess( | ||
'VOLUME ["./1.72x10tothe7thpower", "./4/3pi_r_square"]' | ||
)); | ||
it('Should take a VOLUME that references homedir', expectsSuccess( | ||
@@ -195,0 +207,0 @@ 'VOLUME ~/1.72x10tothe7thpower' |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30330
21
491