Skip to content

ibazel run on container_image does not work #245

Closed
@Globegitter

Description

I have a container_image like follows:

container_image(
    name = "image",
    base = "@nginx_alpine//image",
    directory = "/etc/nginx/",
    docker_run_flags = "--rm -it -p 8080:8080",
    files = [
        "nginx.conf",
    ],
    legacy_run_behavior = False,
)

and all works well when doing bazel run :image, it starts the image, i can CTRL+C out of it etc. but when using ibazel run I am getting the error message from docker:

the input device is not a TTY

By removing either the -i or -t in the docker_run_flags I can get around the error message but then pressing CTRL+C does not actually stop the docker container and on rebuild then it complains that the port is already allocated.

Not sure if there is an easy way to fix this and also happy to investigate myself (though will not happen in the next weeks) but wanted to make sure it is tracked.

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