From 38a3f8cf4cee74d106c8b3520a1ce79a116a4155 Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Thu, 23 Jan 2020 12:38:33 -0500 Subject: [PATCH] add docker build info to wallet server image --- docker/Dockerfile.wallet_server | 5 +++++ docker/hooks/build | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 docker/hooks/build diff --git a/docker/Dockerfile.wallet_server b/docker/Dockerfile.wallet_server index 45e826e65..329a48063 100644 --- a/docker/Dockerfile.wallet_server +++ b/docker/Dockerfile.wallet_server @@ -4,6 +4,10 @@ ARG user=lbry ARG db_dir=/database ARG projects_dir=/home/$user +ARG DOCKER_TAG +ARG DOCKER_COMMIT=docker +ENV DOCKER_TAG=$DOCKER_TAG DOCKER_COMMIT=$DOCKER_COMMIT + RUN apt-get update && \ apt-get -y --no-install-recommends install \ wget \ @@ -29,6 +33,7 @@ WORKDIR $projects_dir RUN pip install uvloop RUN make install +RUN python3 docker/set_build.py RUN rm ~/.cache -rf # entry point diff --git a/docker/hooks/build b/docker/hooks/build new file mode 100644 index 000000000..371640d81 --- /dev/null +++ b/docker/hooks/build @@ -0,0 +1,7 @@ +#!/bin/bash + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$DIR/../.." ## make sure we're in the right place. Docker Hub screws this up sometimes +echo "docker build dir: $(pwd)" + +docker build --build-arg DOCKER_TAG=$DOCKER_TAG --build-arg DOCKER_COMMIT=$SOURCE_COMMIT -f $DOCKERFILE_PATH -t $IMAGE_NAME .