Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions dockerfiles/products/ng-monitoring/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
ARG BASE_IMG=ghcr.io/pingcap-qe/bases/ng-monitoring-base:v1.9.2
FROM $BASE_IMG
LABEL org.opencontainers.image.title="Next Generation Monitoring Server" \
org.opencontainers.image.source="https://github.com/pingcap/ng-monitoring" \
org.opencontainers.image.vendor="PingCAP Inc." \
org.opencontainers.image.licenses="Apache-2.0"
Comment on lines +3 to +6
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

These OCI labels are duplicated across the three ng-monitoring Dockerfiles (Dockerfile, lt6.5.12/Dockerfile, ~6.5.12/Dockerfile). While this is a simple change now, maintaining identical labels across multiple files can become cumbersome if they need to be updated in the future.

Consider if there's a way to define these common labels in a single place, perhaps using build arguments passed during the build process, or a script that generates the Dockerfiles. This would improve maintainability by adhering to the DRY (Don't Repeat Yourself) principle.


COPY ng-monitoring-server /ng-monitoring-server
EXPOSE 12020
ENTRYPOINT ["/ng-monitoring-server"]
5 changes: 5 additions & 0 deletions dockerfiles/products/ng-monitoring/lt6.5.12/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
ARG BASE_IMG=ghcr.io/pingcap-qe/bases/ng-monitoring-base:v1.0.1-old
FROM $BASE_IMG
LABEL org.opencontainers.image.title="Next Generation Monitoring Server" \
org.opencontainers.image.source="https://github.com/pingcap/ng-monitoring" \
org.opencontainers.image.vendor="PingCAP Inc." \
org.opencontainers.image.licenses="Apache-2.0"

COPY ng-monitoring-server /ng-monitoring-server
EXPOSE 12020
ENTRYPOINT ["/ng-monitoring-server"]
5 changes: 5 additions & 0 deletions dockerfiles/products/ng-monitoring/~6.5.12/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
ARG BASE_IMG=ghcr.io/pingcap-qe/bases/ng-monitoring-base:v1.9.2
FROM $BASE_IMG
LABEL org.opencontainers.image.title="Next Generation Monitoring Server" \
org.opencontainers.image.source="https://github.com/pingcap/ng-monitoring" \
org.opencontainers.image.vendor="PingCAP Inc." \
org.opencontainers.image.licenses="Apache-2.0"

COPY ng-monitoring-server /ng-monitoring-server
EXPOSE 12020
ENTRYPOINT ["/ng-monitoring-server"]