Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

validate-dockerfile

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

validate-dockerfile - npm Package Compare versions

Comparing version 1.4.5 to 1.4.6

test/Dockerfiles/Dockerfile-11

4

index.js

@@ -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'

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc