cb12d68fbe
CI Pipeline / HTML Lint (push) Successful in 7s
Deploy QA / Build and Push (push) Successful in 13s
CI Pipeline / Build Docker Image (push) Failing after 28m28s
CI Pipeline / Security Scan (push) Has been skipped
Deploy QA / Deploy to QA (push) Failing after 1s
CI Pipeline / Generate Summary (push) Failing after 0s
Deploy QA / Notification (push) Failing after 1s
Replace nginx config environment variable substitution from envsubst to sed to eliminate the gettext package dependency, reducing the final container image size. Remove unused export statements from the docker-entrypoint.sh script.
38 lines
1.1 KiB
Docker
38 lines
1.1 KiB
Docker
ARG APP_VERSION=0.0.0
|
|
ARG BUILD_DATE=unknown
|
|
ARG GIT_COMMIT=unknown
|
|
ARG GIT_BRANCH=unknown
|
|
|
|
FROM nginx:alpine AS runtime
|
|
|
|
ARG APP_VERSION
|
|
ARG BUILD_DATE
|
|
ARG GIT_COMMIT
|
|
ARG GIT_BRANCH
|
|
|
|
LABEL org.opencontainers.image.title="cicd-multi-env-pipeline-poc"
|
|
LABEL org.opencontainers.image.description="Multi-environment CI/CD pipeline POC"
|
|
LABEL org.opencontainers.image.version="${APP_VERSION}"
|
|
LABEL org.opencontainers.image.created="${BUILD_DATE}"
|
|
LABEL org.opencontainers.image.revision="${GIT_COMMIT}"
|
|
LABEL org.opencontainers.image.source="https://git.kubistudio.cloud/kubistudio/cicd-multi-env-pipeline-poc"
|
|
|
|
RUN apk add --no-cache curl
|
|
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
COPY src/ /usr/share/nginx/html/
|
|
COPY healthcheck.sh /usr/local/bin/healthcheck.sh
|
|
|
|
RUN chmod +x /usr/local/bin/healthcheck.sh
|
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
|
|
|
EXPOSE 80
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD /usr/local/bin/healthcheck.sh
|
|
|
|
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
|
CMD ["nginx", "-g", "daemon off;"]
|