refactor(dockerfile): bump version, new labels

- update to nodeJS 16
- replace label-schema with opencontainers labels
This commit is contained in:
Asif Bacchus 2021-06-10 21:14:17 -06:00
parent ca1d56ba42
commit f31390a3d9
1 changed files with 11 additions and 12 deletions

View File

@ -3,7 +3,7 @@
#
# allow dynamic build by specifying base image as build arg
ARG NODE_TAG="15-alpine3.12"
ARG NODE_TAG="16-alpine3.13"
FROM node:${NODE_TAG}
# change user id of node user
@ -16,14 +16,12 @@ RUN deluser --remove-home node \
RUN apk --update --no-cache add tzdata tini
# labels
LABEL maintainer="Asif Bacchus <asif@bacchus.cloud>"
LABEL org.label-schema.cmd="docker run -d --name livereload -v /dir/to/watch:/var/watch -p 35729:35729 [-e ...] docker.asifbacchus.app/livereload/livereload:latest"
LABEL org.label-schema.description="Dockerized livereload npm running under (limited) node user. Environment variables allow specifying files to watch/exclude and notification delay."
LABEL org.label-schema.name="livereload"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.url="https://git.asifbacchus.app/ab-docker/livereload"
LABEL org.label-schema.usage="https://git.asifbacchus.app/ab-docker/livereload/raw/branch/master/README.md"
LABEL org.label-schema.vcs-url="https://git.asifbacchus.app/ab-docker/livereload.git"
LABEL org.opencontainers.image.authors="Asif Bacchus <asif@bacchus.cloud>"
LABEL org.opencontainers.image.title="livereload npm"
LABEL org.opencontainers.image.description="Dockerized npm livereload running under limited user account. Environment variables allow specifying files to watch/exclude and notification delay."
LABEL org.opencontainers.image.url="https://git.asifbacchus.app/ab-docker/livereload"
LABEL org.opencontainers.image.documentation="https://git.asifbacchus.app/ab-docker/livereload/raw/branch/master/README.md"
LABEL org.opencontainers.image.source="https://git.asifbacchus.app/ab-docker/livereload.git"
# create default volume in case user forgets to map one
VOLUME [ "/var/watch" ]
@ -52,6 +50,7 @@ CMD livereload /var/watch --debug --exts $EXT --exclusions $EXCLUDE -u true --wa
# set build timestamp and version labels
ARG BUILD_DATE
LABEL org.label-schema.version="1.0"
LABEL org.label-schema.build-date=${BUILD_DATE}
#EOF
LABEL org.opencontainers.image.version="1.1"
LABEL org.opencontainers.image.vendor="nodeJS v16.3.0"
LABEL org.opencontainers.image.created=${BUILD_DATE}
#EOF