Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Parse error caused by FROM instruction with digest #9

Open
Mogyuchi opened this issue Oct 12, 2023 · 2 comments
Open

[Bug] Parse error caused by FROM instruction with digest #9

Mogyuchi opened this issue Oct 12, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Mogyuchi
Copy link

Mogyuchi commented Oct 12, 2023

Describe the bug
When the expression FROM <image>@digest is included, a parse error occurs.
It also gives an error when I use FROM <image>:tag@digest.

dprint-plugin-dockerfile version: 0.3.0

Input Code

FROM ghcr.io/jqlang/jq@sha256:12f998e5a6f3f6916f744ba6f01549f156f624b42f7564e67ec6dd4733973146 as fetch-jq

Expected Output

FROM ghcr.io/jqlang/jq@sha256:12f998e5a6f3f6916f744ba6f01549f156f624b42f7564e67ec6dd4733973146 AS fetch-jq

Actual Output

$ dprint check Dockerfile
Error formatting /home/mogyuchi/prj/fixup-twitter-link/Dockerfile. Message: could not parse Dockerfile:  --> 1:23
  |
1 | FROM ghcr.io/jqlang/jq@sha256:12f998e5a6f3f6916f744ba6f01549f156f624b42f7564e67ec6dd4733973146 as fetch-jq␊
  |                       ^---
  |
  = expected EOI
Had 1 error(s) formatting.
@dsherret
Copy link
Member

This is HewlettPackard/dockerfile-parser-rs#7

@zubieta
Copy link

zubieta commented Aug 11, 2024

It looks like there are a couple of PRs (15 and 31) that try to fix this, but there hasn't been any response in a while. I'm wondering if it'll be possible for this plugin to use a patched fork while upstream gets to any of those PRs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants