Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added docker support for osx #6696

Merged
merged 5 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docker/grafana/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ VOLUME /dashboards
ENV GF_SECURITY_ADMIN_USER=admin
ENV GF_SECURITY_ADMIN_PASSWORD=admin

ENV PROMETHEUS_URL=http://host.docker.internal:9090
# Modified datasource to work with a network_mode: host
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to update the comment here, we are not using network_mode: host anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't modify this image because it might be used outside, I'd rather leave this comment that explains this env variable in the first place.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but the comment will be inaccurate after this PR, since we don't use network_mode: host anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So do you suggest to remove the comment?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might not even have to modify the prometheus URL anymore becasue we dropped network_mode: host

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Others might rely on this behavior, I think it's out of scope of this PR. We discussed that before already.

ENV PROMETHEUS_URL=http://prometheus:9090
ENV DASHBOARDS_DIR=/dashboards

CMD [ \
Expand Down
3 changes: 2 additions & 1 deletion docker/grafana_dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ COPY dashboards /dashboards/
ENV GF_SECURITY_ADMIN_USER=admin
ENV GF_SECURITY_ADMIN_PASSWORD=admin

ENV PROMETHEUS_URL=host.docker.internal:9090
# Modified datasource to work with a network_mode: host
ENV PROMETHEUS_URL=http://prometheus:9090
ENV DASHBOARDS_DIR=/dashboards

CMD [ \
Expand Down
8 changes: 6 additions & 2 deletions docker/prometheus/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ COPY prometheus.yml /etc/prometheus/prometheus.yml
COPY --chown=nobody:nobody entrypoint.sh /etc/prometheus/entrypoint.sh
RUN chmod +x /etc/prometheus/entrypoint.sh

ENV BEACON_URL='host.docker.internal:8008'
ENV VC_URL='host.docker.internal:5064'
# Modified datasource to work with a network_mode: host
# Docker DNS: "beacon_node:8008"
# net host: "localhost:8008"
# MacOSX: "host.docker.internal:8008"
ENV BEACON_URL='beacon_node:8008'
ENV VC_URL='validator:5064'
VOLUME /prometheus

ENTRYPOINT ["/etc/prometheus/entrypoint.sh"]
Expand Down
Loading