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

Containerfile: new parser #3974

Closed
wants to merge 1 commit into from

Conversation

masatake
Copy link
Member

Close #3970

Copy link

codecov bot commented Mar 31, 2024

Codecov Report

Attention: Patch coverage is 85.35032% with 23 lines in your changes are missing coverage. Please review.

Project coverage is 85.39%. Comparing base (bfdb3e4) to head (97b7ddb).

Files Patch % Lines
parsers/containerfile.c 85.35% 23 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3974      +/-   ##
==========================================
- Coverage   85.39%   85.39%   -0.01%     
==========================================
  Files         235      236       +1     
  Lines       56607    56764     +157     
==========================================
+ Hits        48337    48471     +134     
- Misses       8270     8293      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@masatake
Copy link
Member Author

masatake commented Apr 4, 2024

I used CPreprocessor as the base parser.
Using CPreprocessor as a base is a good choice for Dockerfile.in/Containerfile.in processed by podman. However, the choice can be troublesome for Dockerfile/Containerfile.

Supporting both Dockerfile.in/Containerfile.in and Dockerfile/Containerfile in a parser is not easy.

We may have to have Containerfile parser and ContainerfileIn parser.
Sigh.

The behavior of podman for processing \ is very different from what I expected.

$ cat Containerfile
From ubi8:latest
RUN echo hello \
                        

    world
ENV A \

ENV X Y
$ podman build -f Containerfile
STEP 1/3: FROM ubi8:latest
STEP 2/3: RUN echo hello     world
--> Using cache 49aca30d51520057b113038edd4ac22596325950f9f9e9095c2c796962dc9ce6
--> 49aca30d5152
STEP 3/3: ENV A ENV X Y
--> Using cache 510da2bbd3ec0dea46afcb4efc938ceed23ec435e904962722db4f858faff363
--> 510da2bbd3ec
510da2bbd3ec0dea46afcb4efc938ceed23ec435e904962722db4f858faff363

I withdraw this pull request.

@masatake masatake closed this Apr 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.

Containerfile/Dockerfile parser
1 participant