Reputation: 2100
Have pulled docker pull prom/prometheus
image and executed run
command to launch the container but it exits immediately.
# docker run --name prometheus-test -idt 0bc82119c95b /bin/bash
# docker ps --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bc29abd91850 0bc82119c95b "/bin/prometheus /bi…" 23 seconds ago Exited (1) 22 seconds ago prometheus-test
Even with docker pull prom/prometheus:v2.23.0
image also same result.
Upvotes: 1
Views: 1405
Reputation: 67
As I know, bash
even sh
do not included in the prometheus image.
⋊> ~/C/prometheus on main ⨯ docker run -t -i quay.io/prometheus/prometheus:v2.29.1 /bin/sh 10:54:46
Error parsing commandline arguments: unexpected /bin/sh
prometheus: error: unexpected /bin/sh
Upvotes: 2
Reputation: 7891
Just remove the daemon-flag - starting a /bin/bash
together with -d
isn't useful.
# docker run --name prometheus-test -it prom/prometheus /bin/bash
When you want to start prometheus without a bash, then just run
# docker run --name prometheus-test -d prom/prometheus
See docker-hub for more information how to use this image.
https://hub.docker.com/r/prom/prometheus/
Upvotes: 2