dockerfile-parser-rs icon indicating copy to clipboard operation
dockerfile-parser-rs copied to clipboard

a Rust library for parsing, validating, and modifying Dockerfiles

Results 18 dockerfile-parser-rs issues
Sort by recently updated
recently updated
newest added

This is a re-up of https://github.com/HewlettPackard/dockerfile-parser-rs/pull/15, but updates the test code to be compatible with current APIs and also includes some additional validation of the digest part (with tests).

Updates the requirements on [snafu](https://github.com/shepmaster/snafu) to permit the latest version. Changelog Sourced from snafu's changelog. 0.8.0 - 2023-12-28 Added snafu(transparent) allows creating compound error types that act as if they...

dependencies

Updates the requirements on [indoc](https://github.com/dtolnay/indoc) to permit the latest version. Release notes Sourced from indoc's releases. 2.0.0 Change handling of final newline at zero levels of indentation (#55) Add concatdoc!...

dependencies

This adjusts the grammar to support hashes in FROM instructions, for example `alpine@sha256:074d...`. Note that `ImageRef` has already parsed these properly for some time, however the dockerfile grammar considered `@`...

The following fails to parse: ```dockerfile ENV MY_DOG=Rex\ The\ Dog ``` ``` could not parse Dockerfile: --> 1:17 | 1 | ENV MY_DOG=Rex\ The\ Dog␊ | ^--- | = expected...

Shell has the following structure: ``` SHELL ["executable", "parameters"] ``` Example: ``` SHELL ["/bin/sh", "-c"] SHELL ["cmd", "/S", "/C"] ``` Instead of a `MiscInstruction` where this gets parsed as a...

Similar to #21, it would be useful to be able to parse out all the parts of `HEALTHCHECK` as it has the following form: ``` HEALTHCHECK [OPTIONS] CMD command HEALTHCHECK...

The ONBUILD instruction has the format: ``` ONBUILD ``` https://docs.docker.com/engine/reference/builder/#onbuild It would probably be better to not parse this as a `MiscInstruction`, but instead it could have the form: ```rs...

e.g. ```Dockerfile FROM quay.io/pusher/wave@sha256:59246319ba2d49fe6096ca80627b02e91faba97a83d9f0231fb08238c315b5e2 ``` ...fails with: ``` [DEBUG] ignoring Dockerfile.test, could not parse as dockerfile: could not parse Dockerfile: --> 3:25 | 3 | FROM quay.io/pusher/wave@sha256:59246319ba2d49fe6096ca80627b02e91faba97a83d9f0231fb08238c315b5e2␊ | ^--- |...

Hello, noticed this parser doesn't have support for the "heredoc" syntax in dockerfiles, which was [added to BuildKit in 2022](https://www.docker.com/blog/introduction-to-heredocs-in-dockerfiles/). This is a pretty recent addition to the Dockerfile syntax....