Skip to content

Quadlet .build, allow setup context directory for custom location of containerignore files #27268

@DevDorrejo

Description

@DevDorrejo

Feature request description

podman version 5.5.2

Hello,

Working with quadlet found, if I setup the structure of the project like this:

app.py
avatar_user.jpg
container/{.containerignore,containerfile}
.env
.git
.gitignore
oauth2.py
pg_websocket.py
requirements.txt
users.json

and use this .build:

[Unit] Description=Build image for APP

[Build]
ImageTag=localhost/app:latest
ForceRM=true
SetWorkingDirectory=%h/app
File=container/containerfile

[Install]
WantedBy=default.target

It will ignore the .containerignore from the folder container.

It will be good have a param like IgnoreFile or ContainerIgnore.

Using PodmanArgs, I will get: unknown flag: --ignorefile container/.containerignore

Suggest potential solution

Add ContainerIgnore or IgnoreFile, to podman quadlet .build template

Have you considered any alternatives?

adding PodmanArgs="--ignorefile container/.containerignore", will fail with unknown flag: --ignorefile container/.containerignore

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueThis issue would be a good issue for a first time contributor to undertake.kind/featureCategorizes issue or PR as related to a new feature.triagedIssue has been triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions