add docker build info to wallet server image

This commit is contained in:
Alex Grintsvayg 2020-01-23 12:38:33 -05:00
parent 8d8a5b36b6
commit 38a3f8cf4c
No known key found for this signature in database
GPG key ID: AEB3F089F86A22B5
2 changed files with 12 additions and 0 deletions

View file

@ -4,6 +4,10 @@ ARG user=lbry
ARG db_dir=/database ARG db_dir=/database
ARG projects_dir=/home/$user 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 && \ RUN apt-get update && \
apt-get -y --no-install-recommends install \ apt-get -y --no-install-recommends install \
wget \ wget \
@ -29,6 +33,7 @@ WORKDIR $projects_dir
RUN pip install uvloop RUN pip install uvloop
RUN make install RUN make install
RUN python3 docker/set_build.py
RUN rm ~/.cache -rf RUN rm ~/.cache -rf
# entry point # entry point

7
docker/hooks/build Normal file
View file

@ -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 .