add customized Grafana for listening on port 80

This commit is contained in:
Peter Cai 2022-10-15 17:04:12 -04:00
parent 4cb106b63e
commit e82eeef365
1 changed files with 10 additions and 0 deletions

10
grafana/Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM grafana/grafana:9.2.0
USER root
# Add cap_net_bind_service to grafana-server, and set default port to 80
RUN apk add --no-cache libcap-utils --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main \
&& setcap cap_net_bind_service=+ep ${GF_PATHS_HOME}/bin/grafana-server \
&& sed -i "s/;http_port = 3000/http_port = 80/" ${GF_PATHS_CONFIG}
USER grafana