Missing Shell in newer Docker images
- Dominant language
- Go
- Stars
- 11.7k
- Forks
- 802
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 80
Description
#### Describe the bug
The newer images (distroless) are missing a shell. This shell is required if a custom entrypoint is defined. In Docker Compose environment this is mandatory to define memberlist .advertise-addr dynamically.
#### To Reproduce
Use grafana/pyroscope:latest
#### Expected behavior
Add a shell to the distroless containers or add another "alpine"? based container
#### Environment
- Docker Compose
*.env*
```env
PYROSCOPE_CONFIG_FILE=pyroscope.yaml
PYROSCOPE_CONFIG_PATH=/etc/pyroscope
PYROSCOPE_CONFIG_PATH_LOCAL=./config/pyroscope
PYROSCOPE_HOST=pyroscope
PYROSCOPE_PORT=4040
PYROSCOPE_LOG_LEVEL=debug
```
*docker-compose.yml*
```yaml
services:
pyroscope:
env_file:
- './.env'
image: 'grafana/pyroscope:latest'
# original behavior
# entrypoint: '${PYROSCOPE_CONFIG_PATH}/entrypoint.sh'
command:
# current workaround, but may work on my machine
- '-memberlist.advertise-addr=172.17.0.1'
- '-config.file=${PYROSCOPE_CONFIG_PATH}/${PYROSCOPE_CONFIG_FILE}'
- '-config.expand-env=true'
volumes:
- '${PYROSCOPE_CONFIG_PATH_LOCAL}:${PYROSCOPE_CONFIG_PATH}'
ports:
- '${PYROSCOPE_PORT}:${PYROSCOPE_PORT}/tcp'
extra_hosts:
- 'host.docker.internal:host-gateway'
```
*pyroscope.yaml*
```yaml
---
server:
http_listen_port: ${PYROSCOPE_PORT}
```
*entrypoint.sh*
```shell
#!/usr/bin/env sh
/usr/bin/pyroscope -memberlist.advertise-addr="$(getent hosts host.docker.internal | awk '{ print $1 }')" "$@"
```
#### Additional information
Same problem also occurs on Mimir, at least they have an alpine [dockerfile](https://github.com/grafana/mimir/blob/main/cmd/mimir/Dockerfile.alpine), but not published.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.