Skip to content

Add --build option to run command #10003

Closed
@0x000bff

Description

@0x000bff

Description

Hi, I imagine a few people have asked this but I couldn't find an existing request...
When running one-off containers via run, it'd be nice to have the --build option to rebuild the image first. This currently exists in the up command, but the up command doesn't have the --rm option.
Can definitely live without, just felt odd that one command didn't have both options.

Current:

docker compose build && docker compose run --rm myapp echo hello

Desired:

docker compose run --rm --build myapp echo hello

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions