From d8edca5ef263a691c7ceaa70da37c52d02b78b3c Mon Sep 17 00:00:00 2001 From: Kaarel Moppel Date: Mon, 12 Aug 2019 19:43:40 +0300 Subject: [PATCH] Docker: daemon only image build helper --- build-docker-daemon.sh | 1 + docker/Dockerfile-daemon | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100755 build-docker-daemon.sh 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 ###