diff --git a/build-docker-daemon.sh b/build-docker-daemon.sh new file mode 100755 index 00000000..ccce6737 --- /dev/null +++ b/build-docker-daemon.sh @@ -0,0 +1 @@ +docker build --build-arg GIT_TIME="`git show -s --format=\"%ci\" HEAD`" --build-arg GIT_HASH=`git show -s --format="%H" HEAD` -t cybertec/pgwatch2-daemon:latest -f docker/Dockerfile-daemon . diff --git a/docker/Dockerfile-daemon b/docker/Dockerfile-daemon index 4d48db1c..45d7a739 100644 --- a/docker/Dockerfile-daemon +++ b/docker/Dockerfile-daemon @@ -9,6 +9,12 @@ RUN apt-get -q update && apt-get -qy install wget git && apt autoremove -y ADD pgwatch2 /pgwatch2 +# For showing Git versions via :8080/versions or 'pgwatch2 --version' +ARG GIT_HASH +ARG GIT_TIME +ENV GIT_HASH=${GIT_HASH} +ENV GIT_TIME=${GIT_TIME} + ### ### Install Go and compile the gatherer daemon ###