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

dockerfilelint

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dockerfilelint - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

49

lib/reference.js
var reference = module.exports = {
'required_params': {
'title': 'Missing Required Parameters',
'description': 'All commands in a Dockerfile require at least 1 argument.',
'title': 'Missing Required Arguments',
'description': `All commands in a Dockerfile require at least 1 argument.
A line in a Dockerfile can be in any of the following formats:
* * *
#### \`# Comment\`
Docker will treat any line that begins with a \`#\` as a comment.
* * *
#### \`INSTRUCTION arguments\`
All instructions require at least 1 argument, and should be on the same line as the \`INSTRUCTION\`.
* * *
#### \`RUN\` continuation
If a \`RUN\` line ends with a \`\\\`, the next line will be treated as part of the same \`RUN\` arguement.
* * *
#### Blank or Whitespace
Blank lines are allowed and will be ignored.
* * *`,
'category': 'Possible Bug'
},
'uppercase_commands': {
'title': 'Capitalize Dockerfile Commands',
'description': `For clarity and readability, all commands in a Dockerfile should be uppercase.
'title': 'Capitalize Dockerfile Instructions',
'description': `For clarity and readability, all instructions in a Dockerfile should be uppercase.
This is a convention adopted by most of the official images and greatly improves readability in long Dockerfiles. For an example of
why this makes a difference, check out the current [redis Dockerfile](https://github.com/docker-library/redis/blob/b375650fb69b7db819e90c0033433c705b28656e/3.0/Dockerfile)
and you should be able to easily see the commands used.`,
and you should be able to easily see the instructions used.`,
'category': 'Clarity'
},
'from_first': {
'title': 'First Command Must Be FROM',
'description': 'The first command in a Dockerfile must specify the base image using a FROM command. Additionally, FROM cannot appear later in a Dockerfile.',
'description': 'The first instruction in a Dockerfile must specify the base image using a FROM command. Additionally, FROM cannot appear later in a Dockerfile.',
'category': 'Possible Bug'
},
'invalid_line': {

@@ -25,2 +42,3 @@ 'title': 'Invalid Line',

},
'sudo_usage': {

@@ -33,15 +51,24 @@ 'title': 'Use Of sudo Is Not Allowed',

},
'apt-get_missing_param': {
'title': 'Missing parameter for `apt-get`',
'description': 'All usage of `apt-get` should include a `-y` flag to ensure it will not block while waiting for input.',
'description': 'Usage of `apt-get` should include a `-y` flag to ensure it will not block while waiting for input.',
'category': 'Possible Bug'
},
'apt-get_recommends': {
'title': 'Consider --no-install-recommends',
'description': 'Consider using a `--no-install-recommends` when `apt-get` installing packages. This will result in a smaller image size.',
'title': 'Consider `--no-install-recommends`',
'description': `Consider using a \`--no-install-recommends\` when \`apt-get\` installing packages. This will result in a smaller image size. For
more information, see [this blog post](http://blog.replicated.com/2016/02/05/refactoring-a-dockerfile-for-image-size/)`,
'category': 'Optimization'
},
'apt-get-upgrade': {
'title': 'apt-get upgrade Is Not Allowed',
'description': 'Use of `apt-get upgrade` is not allowed in a Dockerfile.',
'title': '`apt-get upgrade` Is Not Allowed',
'description': `Use of \`apt-get upgrade\` is not allowed in a Dockerfile. From the [best practices - take 2](http://crosbymichael.com/dockerfile-best-practices-take-2.html) blog post:
> Updates will be baked into the based images you don't need to apt-get upgrade your containers. Because of the isolation that happens this can often fail if something is
> trying to modify init or make device changes inside a container. It also produces inconsistent images because you no longer have one source of truth of how your application
> should run and what versions of dependencies are included in the image.
>
> If there are security updates that a base image needs, let upstream know so that they can update it for everyone and ensure that your builds are consistent again.`,
'category': 'Optimization'

@@ -48,0 +75,0 @@ },

{
"name": "dockerfilelint",
"version": "0.0.7",
"version": "0.0.8",
"description": "A linter for Dockerfiles to find bugs and encourage best practices",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

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