Skip to content

Error when using host:port in a FROM instruction #355

@ArnaudGallardo

Description

@ArnaudGallardo
  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Expected behavior

The linter should run on Dockerfiles that use a custom registry with the following format host:port.

Actual behavior

Returns an error before running any linting checks: unexpected ':' expecting '@', a new line followed by the next instruction, at least one space, or the image tag.

Steps to reproduce the behavior

Create the following Dockerfile:

FROM myregistry:443/imagename:tag

Run docker run --rm -i hadolint/hadolint < Dockerfile.

The error will be triggered.

If you add a .anything after myregistry or if you remove :443 it will work.

Output of hadolint --version or
docker run --rm hadolint/hadolint hadolint --version:

Haskell Dockerfile Linter v1.17.2-8-g65736cb

Dockerfile (if relevant)

FROM myregistry:443/imagename:tag

We are using an Artifactory repository on a local network, that's why we have a host:port registry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions