@@ -7,7 +7,7 @@ FROM ${BASE_IMAGE}:${BASE_TAG} as builder
77
88# Add metadata labels
99LABEL stage=builder
10- LABEL description="Build stage for weather-mcp application"
10+ LABEL description="Build stage for MCP Server application"
1111
1212WORKDIR /opt/app-root/src
1313
@@ -33,22 +33,27 @@ RUN npm ci && \
3333FROM ${BASE_IMAGE}:${BASE_TAG}
3434
3535# Build arguments available in production stage
36+ ARG APP_NAME
3637ARG BASE_IMAGE
3738ARG BASE_TAG
38- ARG VERSION=latest
39+ ARG VERSION
3940ARG BUILD_DATE
4041ARG VCS_REF
42+ ARG MAINTAINER
43+ ARG DESCRIPTION
44+ ARG SOURCE
45+ ARG PORT=8000
4146
4247# Metadata labels for the final image
43- LABEL maintainer="Your Name <your.email@example.com> "
48+ LABEL maintainer="${MAINTAINER} "
4449LABEL version="${VERSION}"
45- LABEL description="Weather MCP Server - Model Context Protocol server for weather data "
46- LABEL org.opencontainers.image.title="weather-mcp "
47- LABEL org.opencontainers.image.description="Weather MCP Server "
50+ LABEL description="${DESCRIPTION} "
51+ LABEL org.opencontainers.image.title="${APP_NAME} "
52+ LABEL org.opencontainers.image.description="${DESCRIPTION} "
4853LABEL org.opencontainers.image.version="${VERSION}"
4954LABEL org.opencontainers.image.created="${BUILD_DATE}"
5055LABEL org.opencontainers.image.revision="${VCS_REF}"
51- LABEL org.opencontainers.image.source="https://github.com/your-org/weather-mcp "
56+ LABEL org.opencontainers.image.source="${SOURCE} "
5257LABEL org.opencontainers.image.base.name="${BASE_IMAGE}:${BASE_TAG}"
5358
5459# Copy built application from builder stage
@@ -67,8 +72,8 @@ ENV PATH=/opt/app-root/src/node_modules/.bin:$PATH
6772HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
6873 CMD node -e "console.log('Health check passed')" || exit 1
6974
70- # Expose 8000
71- EXPOSE 8000
75+ # Expose PORT
76+ EXPOSE ${PORT}
7277
7378# Default command using supergateway for stdio transport
74- CMD ["npx" , "-y" , "supergateway" , "--stdio" , "node build/index.js" ]
79+ CMD ["npx" , "-y" , "supergateway" , "--stdio" , "node build/index.js" ]
0 commit comments