From de0e944c86f8d0d991899682fb25f5a25b58fde9 Mon Sep 17 00:00:00 2001 From: slynn1324 Date: Mon, 25 Jan 2021 11:52:17 -0600 Subject: [PATCH] added version arg and env parm --- Dockerfile | 8 ++++++++ docker-build.sh | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fe2b9d0..7844b6a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,13 @@ FROM node:alpine3.12 +LABEL maintainer="slynn1324@gmail.com" + +ARG VERSION + +LABEL tinypin-version=$VERSION + +ENV TINYPIN_VERSION=$VERSION + COPY . /tinypin WORKDIR /tinypin diff --git a/docker-build.sh b/docker-build.sh index 54f6121..abc846f 100755 --- a/docker-build.sh +++ b/docker-build.sh @@ -1,2 +1,7 @@ #!/bin/sh -docker build -t slynn1324/tinypin . + +docker build \ + -t slynn1324/tinypin \ + --build-arg VERSION=$(git rev-parse --verify --short HEAD) \ + . +