* make origin repo configurable when building image

* halt build process if initial git clone fails
 * log resulting commit id used when building
pull/5/head
Andrew Dolgov 3 years ago
parent 53ed76ed1d
commit 4a7b2aed70

@ -26,6 +26,12 @@ ADD backup.sh /etc/periodic/weekly/backup
ADD config.docker.php ${SCRIPT_ROOT} ADD config.docker.php ${SCRIPT_ROOT}
ADD build-prepare.sh ${SCRIPT_ROOT} ADD build-prepare.sh ${SCRIPT_ROOT}
ARG ORIGIN_REPO_MAIN=https://git.tt-rss.org/fox/tt-rss.git
ARG ORIGIN_REPO_XACCEL=https://git.tt-rss.org/fox/ttrss-nginx-xaccel.git
ENV ORIGIN_REPO_MAIN=${ORIGIN_REPO_MAIN}
ENV ORIGIN_REPO_XACCEL=${ORIGIN_REPO_XACCEL}
RUN sh -c ${SCRIPT_ROOT}/build-prepare.sh RUN sh -c ${SCRIPT_ROOT}/build-prepare.sh
ENV OWNER_UID=1000 ENV OWNER_UID=1000

@ -1,10 +1,15 @@
#!/bin/sh #!/bin/sh -e
DST_DIR=/src/tt-rss DST_DIR=/src/tt-rss
mkdir -p $DST_DIR mkdir -p $DST_DIR
git clone --branch master --depth 1 https://git.tt-rss.org/fox/tt-rss.git $DST_DIR echo cloning $ORIGIN_REPO_MAIN to $DST_DIR...
git clone --branch master --depth 1 https://git.tt-rss.org/fox/ttrss-nginx-xaccel.git $DST_DIR/plugins.local/nginx_xaccel git clone --branch master --depth 1 $ORIGIN_REPO_MAIN $DST_DIR
echo built for: $(git --git-dir=$DST_DIR/.git --no-pager log --pretty='%H' -n1 HEAD)
echo cloning $ORIGIN_REPO_XACCEL to $DST_DIR/plugins.local/nginx_xaccel...
git clone --branch master --depth 1 $ORIGIN_REPO_XACCEL $DST_DIR/plugins.local/nginx_xaccel
echo built for: $(git --git-dir=$DST_DIR/plugins.local/nginx_xaccel/.git --no-pager log --pretty='%H' -n1 HEAD)
mkdir -p /var/www mkdir -p /var/www

Loading…
Cancel
Save