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 .