From 4ef9381acd881a0c9c2119e8b61e5080ca5b9607 Mon Sep 17 00:00:00 2001 From: Travis Shivers Date: Fri, 24 Jul 2020 18:44:38 -0500 Subject: [PATCH] Move labels to last stage --- Dockerfile | 27 +++++++++++++++------------ README.md | 4 ++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index fe384451..52e4c14f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,17 +9,6 @@ ARG SERVERS='[{"name":"Local Server","location":"Local","url":"","image":"synclo ARG SOURCE_BRANCH ARG REVISION -LABEL org.opencontainers.image.created=$BUILD_DATE -LABEL org.opencontainers.image.title="SyncLounge" -LABEL org.opencontainers.image.description="Enjoy Plex with your friends. In Sync. Together." -LABEL org.opencontainers.image.url="https://synclounge.tv/" -LABEL org.opencontainers.image.revision=$REVISION -LABEL org.opencontainers.image.source="https://github.com/samcm/synclounge" -LABEL org.opencontainers.image.vendor="SyncLounge" -LABEL org.opencontainers.image.version=$VERSION -LABEL org.opencontainers.image.licenses="MIT" -LABEL org.opencontainers.image.documentation="https://docs.synclounge.tv/" - RUN npm run build # dependency build environment @@ -34,6 +23,20 @@ COPY config config # production environment FROM node:current-alpine as production-stage WORKDIR /app -COPY --from=build-stage /app/dist dist COPY --from=dependency-stage /app . + +ARG REVISION + +LABEL org.opencontainers.image.created=$BUILD_DATE +LABEL org.opencontainers.image.title="SyncLounge" +LABEL org.opencontainers.image.description="Enjoy Plex with your friends. In Sync. Together." +LABEL org.opencontainers.image.url="https://synclounge.tv/" +LABEL org.opencontainers.image.revision=$REVISION +LABEL org.opencontainers.image.source="https://github.com/samcm/synclounge" +LABEL org.opencontainers.image.vendor="SyncLounge" +LABEL org.opencontainers.image.version=$VERSION +LABEL org.opencontainers.image.licenses="MIT" +LABEL org.opencontainers.image.documentation="https://docs.synclounge.tv/" + +COPY --from=build-stage /app/dist dist ENTRYPOINT ["./docker-entrypoint.sh"] diff --git a/README.md b/README.md index d8320d69..fee1d6d2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[github-docker-badge]: https://github.com/actions/ttshivers/workflows/Docker/badge.svg -[docker-version-badge]: https://images.microbadger.com/badges/version/ttshivers/synclounge:latest.sv +[github-docker-badge]: https://github.com/ttshivers/synclounge/workflows/Docker/badge.svg +[docker-version-badge]: https://images.microbadger.com/badges/version/ttshivers/synclounge:latest.svg [docker-latest-size-badge]: https://images.microbadger.com/badges/image/ttshivers/synclounge:latest.svg [docker-pulls-badge]: https://img.shields.io/docker/pulls/ttshivers/synclounge.svg [license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg