Skip to content

Commit

Permalink
set bind capacity in docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
captncraig committed Apr 3, 2024
1 parent 9646f5c commit a378373
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/grafana-agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ LABEL org.opencontainers.image.source="https://github.com/grafana/agent"
# Install dependencies needed at runtime.
RUN <<EOF
apt-get update
apt-get install -qy libsystemd-dev tzdata ca-certificates
apt-get install -qy libsystemd-dev tzdata ca-certificates libcap2-bin
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EOF

Expand All @@ -53,6 +53,7 @@ RUN groupadd --gid $UID $USERNAME
RUN useradd -m -u $UID -g $UID $USERNAME
RUN chown -R $USERNAME:$USERNAME /etc/agent
RUN chown -R $USERNAME:$USERNAME /bin/grafana-agent
RUN setcap 'cap_net_bind_service=+ep' /bin/grafana-agent

ENTRYPOINT ["/bin/grafana-agent"]
ENV AGENT_DEPLOY_MODE=docker
Expand Down

0 comments on commit a378373

Please sign in to comment.