Skip to content

Have parser error on dockerfiles without instructions#771

Merged
tonistiigi merged 1 commit intomoby:masterfrom
LinuxMercedes:error-on-empty-dockerfile
Jan 5, 2019
Merged

Have parser error on dockerfiles without instructions#771
tonistiigi merged 1 commit intomoby:masterfrom
LinuxMercedes:error-on-empty-dockerfile

Conversation

@LinuxMercedes
Copy link
Contributor

docker build panics on a dockerfile with no instructions (e.g., a dockerfile that contains only comments). This patch produces a parse error for such a dockerfile -- we detect this by determining whether the root AST node has an invalid "StartLine" position.

See moby/moby#38487 for more discussion.

See moby/moby#38487 for more discussion.

Signed-off-by: Natasha Jarus <linuxmercedes@gmail.com>
@tonistiigi tonistiigi merged commit 34ff9c2 into moby:master Jan 5, 2019
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this pull request Jan 16, 2019
See moby/buildkit#771

Signed-off-by: Natasha Jarus <linuxmercedes@gmail.com>
Upstream-commit: d104a750f9dfcd58b95b0142197a69cc4eca3bc0
Component: engine
adi-dhulipala pushed a commit to adi-dhulipala/docker that referenced this pull request Apr 11, 2019
See moby/buildkit#771

Signed-off-by: Natasha Jarus <linuxmercedes@gmail.com>
thaJeztah added a commit to thaJeztah/cli that referenced this pull request Apr 20, 2019
…branch)

full diff: https://github.com/moby/buildkit/compare/520201006c9dc676da9cf9655337ac711f7f127d..05766c5c21a1e528eeb1c3522b2f05493fe9ac47

- moby/buildkit#952 [18.09 backport] Have parser error on dockerfiles without instructions
  - backport of moby/buildkit#771 Have parser error on dockerfiles without instructions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/docker that referenced this pull request Jun 18, 2019
…branch)

- moby/buildkit#952 [18.09 backport] Have parser error on dockerfiles without instructions
  - backport of moby/buildkit#771 Have parser error on dockerfiles without instructions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this pull request Jun 18, 2019
…branch)

full diff: https://github.com/moby/buildkit/compare/520201006c9dc676da9cf9655337ac711f7f127d..05766c5c21a1e528eeb1c3522b2f05493fe9ac47

- moby/buildkit#952 [18.09 backport] Have parser error on dockerfiles without instructions
  - backport of moby/buildkit#771 Have parser error on dockerfiles without instructions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 65b28186fc4172670b3279e882429496dcbe7ce6
Component: cli
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this pull request Jun 18, 2019
…branch)

- moby/buildkit#952 [18.09 backport] Have parser error on dockerfiles without instructions
  - backport of moby/buildkit#771 Have parser error on dockerfiles without instructions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a1d76e0585c498f5167b28b9909fd8c88fd3370d
Component: engine
ingvagabund added a commit to ingvagabund/oc that referenced this pull request Jul 3, 2024
ingvagabund added a commit to ingvagabund/oc that referenced this pull request Jul 3, 2024
ingvagabund added a commit to ingvagabund/oc that referenced this pull request Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants