redcoolbeans / dockerlint Goto Github PK
View Code? Open in Web Editor NEWLinting tool for Dockerfiles
License: MIT License
Linting tool for Dockerfiles
License: MIT License
I currently use double-quotes to surround the arguments to ENTRYPOINT
, but dockerlint is mistakenly reporting linter warnings when the contents have single quotes.
I'm getting an Empty / bogus instruction is invalid
but i'm pretty sure its ok.
This is part of my dockerfile. This runs correctly in docker.
RUN apk update \
# psycopg2 dependencies
&& apk add --virtual build-deps gcc python3-dev musl-dev \
&& apk add postgresql-dev \
I have multiple lines after this one that start with &&
and they do not have this error.
Latest, used by this repo (AtomLinter/linter-docker) which is a wrapper for redcoolbeans/dockerlint. Link to other issue.</>
E.g., I need an ADD
in order to copy and extract a stage3 tarball for building a Gentoo container. Docker doesn't yet have an "EXEC" command to accomplish this. I want to lint my Dockerfile, but ignore the necessary ADD
.
dockerlint claims an incorrect ERROR.
With the provided test Dockerfile.txt :
`
$ node bin/dockerlint -f Dockerfile.txt
ERROR: RUN contains undefined ARG or ENV variable on line 5
ERROR: Dockerfile.txt failed.
`
All, after 359300b (bisected).
Hi Team,
I wanted to understand if there is a way to add my custom rules without having to write any code ?
Is there any configuration file maintained where rules can be added/modified/removed?
-Soumyadeep
False positive on RUN
with square brackets [
in the script.
If a script in RUN
has square brackets (see test and [) and the expression evaluated contains single quotes, then docker lint will show Arguments to RUN in exec form must not contain single quotes on line
even though this is not the exec form
RUN if [ 'test' = 'test' ]; then echo oops; fi
0.3.1
Unfortunately the ARG
instruction is not supported the way that ENV
is, causing incorrect errors.
FROM scratch
ARG HOME=/home/app
WORKDIR $HOME
docker run -v "$PWD/Dockerfile":/Dockerfile:ro redcoolbeans/dockerlint
...
ERROR: WORKDIR path $HOME contains undefined ENV variable on line 3
ERROR: /Dockerfile failed.
0.3.1
"RepoTags": [
"redcoolbeans/dockerlint:latest"
],
"RepoDigests": [
"redcoolbeans/dockerlint@sha256:5c11597ac2ed10d2aa32db3360548b8fe9635a52078c05778d17f6359b96f2f1"
],
"Parent": "",
"Comment": "",
"Created": "2017-08-25T06:00:29.762704377Z",
I'm new to Docker and GitLab CI, and I want to use your redcoolbeans/dockerlint
image in GitLab CI to test my Dockerfile before trying to rebuild the image. However running the redcoolbeans/dockerlint
image results in an error.
I have a GitLab repo which contains a Dockerfile
for an image I want to build, and a .gitlab-ci.yml
config file for the CI tests.
# .gitlab-ci-yml
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
stages:
- check
- build
dockerlint:
image: redcoolbeans/dockerlint
stage: check
script:
- ""
only:
- branches
build:
image: docker:latest
services:
- docker:dind
stage: build
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
tags:
- dind
As I understand it, redcoolbeans/dockerlint
has an ENTRYPOINT
which makes it execute dockerlint
on a Dockerfile
in the current directory, so I shouldn't need to specify a script
directive in my CI config. However, script
is a mandatory parameter so I've set it to a blank script.
The output of my CI test fails with:
Running with gitlab-ci-multi-runner 9.5.1 (96b34cc)
on dind (a5785152)
Using Docker executor with image redcoolbeans/dockerlint ...
Using docker image sha256:f8e4bcf6d77d0ed4db3fe044ad5cbc48d147d388e392989df13626b710479ad7 for predefined container...
Pulling docker image redcoolbeans/dockerlint ...
Using docker image redcoolbeans/dockerlint ID=sha256:ef2fc2ba2a1ce83fefd113345ecc551b98ab04c326208b92db060177b5e9e0f0 for build container...
Running on runner-a5785152-project-257-concurrent-0 via gitlab-ci-dv0.isys.bris.ac.uk...
Fetching changes...
HEAD is now at 8b2334c Try setting a blank script
From https://git.services.bristol.ac.uk/resnet/netops-ci
8b2334c..ff53251 ci -> origin/ci
Checking out ff532510 as ci...
Skipping Git submodules setup
ERROR: Cannot open sh.
ERROR: Cannot open sh.
ERROR: Job failed: exit code 1
It looks like GitLab CI is trying to use /bin/sh
as the shell and failing. I tried overriding the entrypoint of your image to /bin/sh
and then making the script manually execute dockerlint Dockerfile
but this failed with the same error.
Is the cause of the problem that the image doesn't contain a shell? Any ideas how I can work around this with GitLab CI? I couldn't find any examples online of people using this image with GitLab CI. Hopefully it's a simple fix but I'm just too inexperienced with Docker.
Latest docker image:
f8e4bcf6d77d0ed4db3fe044ad5cbc48d147d388e392989df13626b710479ad7
I have a Dockerfile containing the following line:
RUN echo "jenkins ALL=(ALL) ALL" >> etc/sudoers
which to my knowledge is not running a command with sudo
if i run dockerlint Dockefile, i get the following message
WARN: sudo(8) usage found on line 35 which is discouraged
If any of the ENTRYPOINT args contain a comma, it will be marked as an error even though it's inside double-quotes.
# Dockerfile
FROM alpine
ENTRYPOINT ["echo", "hello,world"]
dockerlint version 0.2.0, on OSX
Repo is not being maintaned
Look at the issues, some are a year old
0.3.1
The linter complains about WORKDIR calls that do not include absolute paths.
WORKDIR /
WORKDIR go
The linter complains about the second line above, however, the dockerfile reference documentation clearly states that WORKDIR calls with relative paths will result in the path relative to the previous WORKDIR calls.
https://docs.docker.com/engine/reference/builder/#workdir
Add a WORKDIR call to a Dockerfile that does not include an absolute path (i.e. has a relative path)
Run using AtomLinter/linter-docker (wrapper for dockerlint)
Installed v0.3.2 of AtomLinter/linter-docker which has a dockerlint dependency v0.3.9
Hello,
It's incredible!
Do you know if there is something that does the same thing with docker-compose files ?
Using an environment variable as WORKDIR should be allowed.
This is valid syntax in a Dockerfile:
ENV MY_PATH=/var/foo
WORKDIR $MY_PATH
But dockerlint says WORKDIR path $MY_PATH must be absolute
.
As specified in Dockerfile reference:
# escape=\
# escape=`
Theescape
directive sets the character used to escape characters in aDockerfile
. If not specified, the default escape character is\
.
The escape character is used both to escape characters in a line, and to escape a newline. This allows aDockerfile
instruction to span multiple lines. Note that regardless of whether theescape
parser directive is included in aDockerfile
, escaping is not performed in aRUN
command, except at the end of a line.
Setting the escape character to`
is especially useful on Windows, where\
is the directory path separator.`
is consistent with Windows PowerShell.
linter-docker does not currently check the escape directive and will report a line error if another character is used.
I was considering to use dockerlint programmatically, but it looks like there is no public programmatic API.
const dockerlint = require("dockerlint");
causes
ERROR: Cannot open Dockerfile.
and exits with code 1.
0.3.1
If the Dockerfile
starts with a comment whose line starts with a sequence of more than one pound sign (#
) the parser does not recognize the line as a comment and prints the following error message
ERROR: First instruction must be 'FROM', is: ####
Create a Dockerfile
that starts with a comment such as below and run it through the linter:
#### BUILDER
FROM alpine:edge AS builder
I used the docker image, tag is 0.3.1
.
dockerlint
gives an error "No closing bracket found" given this valid instruction:
CMD ["foo",\
"bar"]
Try to lint a Dockerfile
with a multi-line CMD
instruction...
0.2.0, as used inside linter-docker
in Atom
First occurrence of ENV
followed with \
to improve readability show error as invalid format:
ERROR: ENV invalid format ,TEST1=test1,SUPA1=supa1 on line 1
Second occurrence is not marked.
I would like to not have this error because such code is more readable for me.
Run dockerlint
against following Dockerfile
FROM scratch
ENV \
TEST1=test1 \
SUPA1=supa1
ENV \
TEST2=test2 \
SUPA2=supa2
Other example: https://github.com/umputun/baseimage/blob/master/base.alpine/Dockerfile#L3
Dockerlint 0.3.9
I am using an ENV variable that is defined in the base image, dockerlint doesn't like it:
ERROR: RUN contains undefined ARG or ENV variable on line 3
That variable is defined in the base image specifically for using it in descendant images.
How do I tell dockerlint that that ENV variable is defined?
FROM php:fpm-alpine
RUN apk add --no-cache $PHPIZE_DEPS \
&& pecl install ast \
&& docker-php-ext-enable ast \
&& apk del $PHPIZE_DEPS
Latest redcoolbeans/dockerlint Docker image.
This seems different from #47 and #49
This should not raise any issues:
ARG FOO
RUN [[ -n "$FOO" ]]
It raises:
ERROR: Arguments to RUN in exec form must not contain single quotes on line 26
ERROR: RUN contains undefined ARG or ENV variable on line 26
0.3.1
and 0.3.9
are affected.
dockerlint reports false positive when CMD includes whitespace between brackets and quotes.
add spaces between brackets and quotes triggers this lint error
CMD [ "node" ]
0.2.0
Linter does not catch error in invalid RUN
command
Dockerfile:
FROM ruby:2.1.5
RUN
apt-get update && apt-get install -y libxslt-dev libxml2-dev screen rsync
Here is output of docker build
command:
Error response from daemon: Dockerfile parse error line 4: unknown instruction: APT-GET
Here is output of dockerlint
:
INFO: Dockerfile is OK.
Same goes for cases:
RUN apt-get update
&& apt-get install -y libxslt-dev libxml2-dev screen rsync
RUN apt-get update \\
&& apt-get install -y libxslt-dev libxml2-dev screen rsync
RUN apt-get update \
&& apt-get install -y
libxslt-dev libxml2-dev screen rsync
dockerlint: 0.3.1
node: v7.10.1
npm: 4.2.0
docker: 17.09.0-ce, build afdb6d4
OS: macOS Sierra 10.12.6
In my Dockerfile I have my ENV instructions reduced to 1 layer. (per the example at: https://docs.docker.com/engine/reference/builder/#env)
I have some comments during a line continuation using #
Dockerfile with multiple env instructions on one layer.
Specifically 3 comment lines in a row, during a line continuation.
Here is a Dockerfile I am able to reproduce this with:
FROM centos
ENV FOO=fooo \
BAR=/opt/bar \
BAS=elk \
#
# Baz does baz things
#
BAZ=/opt/baz\ /r \
BAN=/opt/ban
If you have an ARG
that you'd like to be shared for all stages, the convention is to do the following:
# This is global.
ARG FOO=/path/to/something
FROM alpine:latest as base1
# Call `ARG` with just the key to load the variable from global.
ARG FOO
COPY $FOO/bar .
WORKDIR $FOO
The linter will then say:
COPY contains undefined ARG or ENV
WORKDIR path $FOO must be absolute
See description above
master
Remove the trailing spaces check on comment lines
Add a comment with a trailing space
# this is a test
then run the dockerlint
master
When using version 0.3.5 dockerlint repeats the same erros.
You may reproduce this by linting a Dockefile containing the following content:
FROM someimage
ENV ENV_VARIABLE
The output is:
ERROR: ENV invalid format ENV_VARIABLE on line 2
ERROR: ENV invalid format ENV_VARIABLE on line 2
ERROR: ENV invalid format ENV_VARIABLE on line 2
ERROR: spec/fixtures/bad/Dockerfile failed.
When using dockerlint version 0.3.1 the output is:
ERROR: ENV invalid format ENV_VARIABLE on line 2
ERROR: spec/fixtures/bad/Dockerfile failed.
Linting fails for ENV rule including '=' symbol.
Example
FROM postgres:9.6
ENV POSTGRES_INITDB_ARGS --auth-host=md5
ERROR: ENV cannot mix the two formats for declaring variables line 3
0.2.2 (Commit 1fa5bfe)
As a developer, I want dockerlint to automatically look for any and all Dockerfile*
paths within directory trees, so that I can quickly lint large projects that have many Dockerfile's.
As describe here : https://docs.docker.com/engine/reference/builder/#maintainer-deprecated
The MAINTAINER
instruction is deprecated, is it possible to launch a warning/error during checks ?
$ cat > Dockerfile << 'EOF'
FROM centos
CMD \
["bash"]
EOF
$ dockerlint Dockerfile
check: from_first
check: no_empty_tag
check: no_empty_digest
check: json_array_brackets
check: json_array_even_quotes
check: json_array_format
DEBUG:'Arg: ["bash"]'
check: recommended_exec_form
WARN: Recommended exec/array form not used on line 3
check: add
check: multiple_entries
check: sudo
check: absolute_workdir
check: onbuild_copyadd
check: onbuild_disallowed
check: label_no_empty_value
ERROR: Dockerfile failed.
Dockerlint 0.2.0
I use an empty ENTRYPOINT in my Dockerfile to explicitly reset the ENTRYPOINT defined by the parent docker image.
Dockerlint falsely claims that this line contains single quotes:
ERROR: Arguments to ENTRYPOINT in exec form must not contain single quotes on line 2
FROM certbot/certbot
ENTRYPOINT []
both master and 0.3.1
I got the following output when attempting to run the tests for dockerlint
v0.1.4 on Windows:
1) parser should count the lines correctly:
AssertionError: expected 6 to deeply equal 8
+ expected - actual
-6
+8
at Assertion.assertEqual (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\chai\lib\chai\core\assertions.js:439:19)
at Assertion.ctx.(anonymous function) [as equal] (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\chai\lib\chai\utils\addMethod.js:40:25)
at Context.<anonymous> (C:\Users\Landon Abney\Documents\GitHub\dockerlint\test\parserTest.coffee:45:68)
at callFn (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runnable.js:286:21)
at Test.Runnable.run (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runnable.js:279:7)
at Runner.runTest (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runner.js:421:10)
at C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runner.js:528:12
at next (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runner.js:341:14)
at C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runner.js:351:7
at next (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runner.js:283:14)
at Immediate._onImmediate (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runner.js:319:5)
I'm guessing this is a combination of two things:
.gitattributes
file specifying the line endings for files in this repository, so on Windows it is defaulting to CRLF
.This test works correctly on my Ubuntu virtual machine.
Note:
As make
isn't defined by default I was simply running the following manually:
.\node_modules\.bin\mocha --require coffee-script/register --require chai --reporter spec --compilers coffee:coffee-script/register test/*.coffee
When running the tests for dockerlint
v0.1.4 on Windows I got the following output:
2) parser should handle line continuations:
AssertionError: expected [ Array(5) ] to deeply equal [ Array(3) ]
+ expected - actual
}
{
"arguments": [
"yum update &&"
+ "yum install mg &&"
+ "yum upgrade"
]
"instruction": "RUN"
"line": 3
}
{
"arguments": [
- "yum install mg &&"
- ]
- "instruction": ""
- "line": 4
- }
- {
- "arguments": [
- "yum upgrade"
- ]
- "instruction": ""
- "line": 5
- }
- {
- "arguments": [
"yum -y update && \\\\ yum -y install tmux"
]
"instruction": "RUN"
"line": 7
at Assertion.assertEqual (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\chai\lib\chai\core\assertions.js:439:19)
at Assertion.ctx.(anonymous function) [as equal] (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\chai\lib\chai\utils\addMethod.js:40:25)
at Context.<anonymous> (C:\Users\Landon Abney\Documents\GitHub\dockerlint\test\parserTest.coffee:53:68)
at callFn (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runnable.js:286:21)
at Test.Runnable.run (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runnable.js:279:7)
at Runner.runTest (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runner.js:421:10)
at C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runner.js:528:12
at next (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runner.js:341:14)
at C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runner.js:351:7
at next (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runner.js:283:14)
at Immediate._onImmediate (C:\Users\Landon Abney\Documents\GitHub\dockerlint\node_modules\mocha\lib\runner.js:319:5)
And since the output is much nicer looking with color, here is a screenshot of the first part:
I'm not sure what the issue is here, although I wouldn't be surprised if this is related to the file being checked out as CRLF
on Windows by default. This test passes on my Ubuntu virtual machine.
If you need any further information please let me know.
Note:
As make
isn't defined by default I was simply running the following manually:
.\node_modules\.bin\mocha --require coffee-script/register --require chai --reporter spec --compilers coffee:coffee-script/register test/*.coffee
When attempting to run dockerlint
v0.1.4 on a file that is effectively empty, it crashes.
Here is what I get in an Ubuntu virtual machine when running dockerlint test/dockerfiles/empty
:
abneyl@ubuntu:~/Documents/GitHub/dockerlint$ dockerlint test/dockerfiles/empty
/usr/lib/node_modules/dockerlint/lib/checks.js:41
if (first.instruction !== 'FROM') {
^
TypeError: Cannot read property 'instruction' of undefined
at Object.exports.from_first (/usr/lib/node_modules/dockerlint/lib/checks.js:41:14)
at Object.exports.run (/usr/lib/node_modules/dockerlint/lib/cli.js:50:24)
at Object.<anonymous> (/usr/lib/node_modules/dockerlint/bin/dockerlint.js:17:7)
at Object.<anonymous> (/usr/lib/node_modules/dockerlint/bin/dockerlint.js:19:4)
at Module._compile (module.js:398:26)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:430:10)
at startup (node.js:141:18)
Windows has the same issue, only the paths are different. The comment_only
file exhibits the same behavior.
Version 0.2.0 is a year old and more than 10 commits have been merged since the release including fixes to typos in output messages. Time to do a new release?
When declaring an ENV
variable its value must be declared too.
When running the linter for the following content of a Dockerfile on earlier versions of dockerlint I received the error ERROR: ENV invalid format ENV_VARIABLE
. However, the same error is not displayed anymore since the release 0.3.6
FROM someimage
ENV ENV_VARIABLE
ENV
requires to be followed by both a key and a value. When trying to build a Dockerfile containing the content above, Docker displays Error response from daemon: ENV must have two arguments
.
So, it seems that dockerlint should go back to the earlier behavior and display an error message in such situation.
Related to #46
ARGs without a default value create an 'invalid format' error (see below), even though they are perfectly valid according to the docker reference docs.
Also, the same error message is printed three times.
$ cat /tmp/Dockerfile
FROM busybox
ARG user1
ARG buildno
$ make js && coffee bin/dockerlint.coffee -f /tmp/Dockerfile
npm install
coffee -c bin/dockerlint.coffee
coffee -o lib -c src
# Insert shebang so the resulting script runs standalone
{ echo '#!/usr/bin/env node '; cat bin/dockerlint.js; } > bin/dockerlint.js.tmp
mv bin/dockerlint.js.tmp bin/dockerlint.js
ERROR: ARG invalid format user1 on line 2
ERROR: ARG invalid format user1 on line 2
ERROR: ARG invalid format user1 on line 2
ERROR: /tmp/Dockerfile failed.
master
When declaring an ENV variable, the variable must be defined. This issue appeared in the latest version of dockerlint.
file /tmp/dockerlint/Dockerfile
FROM alpine:3.6
ENV ENV_VARIABLE
Running docker build /tmp/dockerlint
returns:
Sending build context to Docker daemon 2.048kB
Error response from daemon: ENV must have two arguments
But running dockerlint /tmp/dockerlint/Dockerfile
returns:
INFO: /tmp/dockerlint/Dockerfile is OK.
Version 0.3.8 of dockerlint is affected.
I am running the latest version of docker (18.03.0-ce), I have also tested using 17.x.
Related to #48
For example, the following RUN line:
RUN pip install requests[security]
fails because it thinks it's an exec form line, probably because of the regex that looks for brackets anywhere in the line.
When extracting a compressed tar file with .tgz suffix, falsely identifies as requiring COPY instead.
:3 DL3020 Use COPY instead of ADD for files and folders
Need to add all suffixes from Wikipedia Tar Suffixes
Tar and use Add .tgz in dockerfile and see request to use COPY not ADD.
Git sha1: 22e1eef5815e1e970c2b488998266505fe5d300b
Line 79 in 8206634
Arguments to ENTRYPOINT in exec for must not contain single quotes --> Arguments to ENTRYPOINT in exec form must not contain single quotes
Very minor, but still can be confusing initially when displayed.
I have received the following error with $INSTALLPATH set to /app
ERROR: WORKDIR path $INSTALLPATH must be absolute on line 20
$INSTALLPATH was set via ENV like this
ENV INSTALLPATH /app
The check should resolve environment variables.
dockerlint incorrectly reports errors for every line inside a RUN<<HEREDOC ... HEREDOC stanza.
All. Currently, I'm using the most recent version as of the date of this report (0.3.2).
TypeError thrown for Dockerfile with multiple ENV rules.
Example
FROM postgres:9.6
ENV POSTGRES_PASSWORD test
ENV POSTGRES_INITDB_ARGS test
<...>\node_modules\dockerlint\lib\checks.js:257
for (k = 0, len1 = ref.length; k < len1; k++) {
^
TypeError: Cannot read property 'length' of undefined
at Object.exports.env (<...>\node_modules\dockerlint\lib\checks.js:257:29)
at Object.exports.run (<...>\node_modules\dockerlint\lib\cli.js:54:24)
at Object.<anonymous> (<...>\node_modules\dockerlint\bin\dockerlint.js:17:7)
at Object.<anonymous> (<...>\node_modules\dockerlint\bin\dockerlint.js:19:4)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
0.2.2 (Commit 1fa5bfe)
In the roadmaps section of the readme, there's mention of a --version
flag that checks against the Docker version. Can anyone expand on the mechanics of this proposed feature?
I find this package to be useful. If it doesn't take too much time to develop, I'd be willing to give it a shot at implementation.
I can not find the way to escape the variable value:
ENV SOME_PASSWORD=ASDFLKJSDLKFJK?^\$9
The $ sign is not variable - it is escaped. For me and docker it's ok, I get correct value inside docker, but dockerlint complains:
docker run -it --rm -v "$PWD/Dockerfile":/Dockerfile:ro redcoolbeans/dockerlint
ERROR: ENV contains undefined ARG or ENV variable on line 13
ERROR: Lines cannot have trailing spaces
ERROR: /Dockerfile failed.
Is it bug or feature? How to hold such values in the Dockerfile?
I use latest version:
redcoolbeans/dockerlint latest bf4955dfb649 11 days ago 41.5MB
Getting an ADD instruction used instead of COPY
warning on a line like:
ADD https://example.com/foo /foo
COPY
doesn't support pulling from URLs, so obviously COPY
could not be used in this case.
While it's often preferable to use COPY
, there are valid use cases for ADD
that should not be discouraged. See: https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#/add-or-copy
Lint a Dockerfile
with an ADD
instruction that unrolls a tarball or pulls from a URL
0.2.0 (used inside linter-docker
in Atom)
The absolute path rule for the work dir gives an error on Windows when the Dockerfile does contain an absolute path.
WORKDIR /data
On windows the check recognizes this path as relative where on Linux it works properly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.