Dockerfile Linter
- POST
- /workspaces
- /:workspace
- /projects
- /:project_name
- /pipelines
- /:pipeline_id
- /actions
List of errors that can be ignored by Linter
| Code | Description |
|---|---|
| EL0001 | Invalid line |
| ED0001 | All parser directives must be at the very top of a Dockerfile |
| ED0002 | Directive appears more then once |
| ED0003 | Directives should be lowercase |
| ED0004 | Parser directive will be treated as a comment |
| ED0005 | Missing value for directive |
| ER0001 | Set the SHELL option -o(-eo for Alpine image) pipefail before RUN with a pipe in |
| ER0002 | Delete the apt-get lists after installing something |
| ER0003 | Use WORKDIR to switch to a directory |
| ER0004 | Do not use sudo, consider using gosu |
| ER0005 | Command (ssh,shutdown,service,ps,free,top,kill,mount) does not make sense in a container |
| ER0006 | Using (apt-get upgrade,dist-upgrade,apk upgrade,apt install) is not recommended |
| ER0007 | Either use wget or curl but not both |
| ER0008 | Use SHELL to change the default shell |
| ER0009 | Use the -y switch |
| ER0010 | Avoid additional packages by specifying --no-install-recommends |
| ER0011 | Use the --no-cache switch |
| ER0012 | Pin versions in apt get install |
| ER0013 | Pin versions in pip install |
| ER0014 | Pin versions in npm install |
| ER0015 | Pin versions in apk add |
| ER0016 | Pin versions in gem install |
| EU0001 | Last user should not be root |
| EI0001 | There can only be one instruction like (CMD,HEALTHCHECK,ENTRYPOINT) |
| EI0002 | FROM may only be preceded by one or more ARG |
| EI0003 | MAINTAINER is deprecated instead use LABEL |
| EI0004 | Don't use (ONBUILD,FROM,MAINTAINTER) in ONBUILD |
| EI0005 | Instructions should be uppercase |
| EF0001 | Missing FROM |
| EF0002 | FROM aliases must be unique |
| EF0003 | Using latest is prone to errors if the image will ever update |
| EF0004 | Always tag the version of an image explicitly |
| EC0001 | COPY --from cannot reference its own FROM alias |
| EC0002 | COPY --from should reference a previously defined FROM alias |
| EC0003 | Use ADD for extracting archives into a image |
| EC0004 | COPY with more then 2 arguments requires the last argument to end with / |
| EJ0001 | You must use double-quotes (") in JSON array |
| EJ0002 | CMD and ENTRYPOINT should be written in JSON form |
| EJ0003 | SHELL must be written in JSON form |
| EA0001 | Use curl or wget instead, and delete files when no longer needed |
| EA0002 | Use COPY instead of ADD for files and folders |
| EW0001 | Use absolute WORKDIR |
| EE0001 | Valid UNIX ports range from 0 to 65535 |
Request
URL PARAMETERS
workspacerequired string
The workspace name.pipeline_idrequired integer
The numerical ID of the desired pipeline.project_namerequired string
The name ID of the project.POST PARAMETERS
namerequired string
The name of the action.typerequired string
The type of the action. Should be set to DOCKERFILE_LINTER.local_pathstring
The path from which a Dockerfile is chosen.shell_typestring
Type of shell in which the errors will be detected. Available values: sh, bash, dash, kshignore_codesstring
The errors that will be ignored by linter. You can find the error codes below or use ShellCheck.ignores_pathstring
The path to the yaml file with ignores.Last modified on Apr 22, 2025
Example:
curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "linter",
"type": "DOCKERFILE_LINTER",
"trigger_time": "ON_EVERY_EXECUTION",
"local_path": "Dockerfile",
"shell_type": "bash",
"ignore_codes": "ER0012,ER0015,SC1017,SC2020",
"ignores_path": "ignores.yaml"
}'EXAMPLE RESPONSE{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/2", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/2/action/2/edit", "id": 2, "name": "linter", "type": "DOCKERFILE_LINTER", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INITIAL", "local_path": "Dockerfile", "shell_type": "bash", "ignore_codes": "ER0012,ER0015,SC1017,SC2020", "ignores_path": "ignores.yaml", "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/2", "id": 2, "name": "test server", "on": "CLICK", "refs": [ "refs/heads/master" ], "last_execution_status": "SUCCESSFUL", "last_execution_revision": "506a3963507943d6908154f4bc9646e829128a08" } }
STATUS201 Created
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999