Skip to content
Snippets Groups Projects
Commit 557f8e44 authored by egon w. stemle's avatar egon w. stemle :robot:
Browse files

Fix LABELs invalidating docker cache

parent aabc33fa
No related branches found
No related tags found
No related merge requests found
......@@ -6,14 +6,12 @@
FROM ubuntu:16.04
ARG LABEL_VERSION
ARG LABEL_BUILD_DATE=now
ARG LABEL_BUILD_DATE
ARG LABEL_VCS_URL="https://gitlab.inf.unibz.it/commul/docker/clarin-dspace"
ARG TOMCAT_VERSION="8.0.53"
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>" \
maintainer="Egon W. Stemle <egon.stemleg@eurac.edu>" \
org.label-schema.version=$LABEL_VERSION \
org.label-schema.build-date=$LABEL_BUILD_DATE \
org.label-schema.vcs-url=$LABEL_VCS_URL
# Set "APT::Get::{Assume-Yes, Fix-Broken} to true"
......@@ -144,6 +142,9 @@ RUN cp /opt/repository/workspace/config/etc/init.d/handle-server /etc/init.d/
RUN chmod +x /etc/init.d/handle-server
RUN perl -pi -e 's#DSPACE_INSTALLATION_DIRECTORY=#DSPACE_INSTALLATION_DIRECTORY=/opt/lindat-dspace/installation#' /etc/default/handle-server
LABEL org.label-schema.version=$LABEL_VERSION \
org.label-schema.build-date=$LABEL_BUILD_DATE
# copy entrypoint script and start
COPY commul-customization/entrypoint.sh /usr/bin/entrypoint.sh
RUN chmod u+x /usr/bin/entrypoint.sh
......
......@@ -6,14 +6,12 @@
FROM ubuntu:16.04
ARG LABEL_VERSION
ARG LABEL_BUILD_DATE=now
ARG LABEL_BUILD_DATE
ARG LABEL_VCS_URL="https://gitlab.inf.unibz.it/commul/docker/clarin-dspace"
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>" \
maintainer="Egon W. Stemle <egon.stemleg@eurac.edu>" \
org.label-schema.version=$LABEL_VERSION \
org.label-schema.build-date=$LABEL_BUILD_DATE \
org.label-schema.vcs-url=$LABEL_VCS_URL
# install cpanm and dependencies
......@@ -137,4 +135,7 @@ RUN yui-compressor -o aai.min.js aai.js
# add IdP metadata from CLARIN server
ADD https://infra.clarin.eu/aai/prod_md_about_spf_idps.xml /opt/shibboleth-sp-fastcgi/var/cache/shibboleth/
LABEL org.label-schema.version=$LABEL_VERSION \
org.label-schema.build-date=$LABEL_BUILD_DATE
ENTRYPOINT ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf"]
......@@ -6,14 +6,12 @@
FROM postgres:9.6
ARG LABEL_VERSION
ARG LABEL_BUILD_DATE=now
ARG LABEL_BUILD_DATE
ARG LABEL_VCS_URL="https://gitlab.inf.unibz.it/commul/docker/clarin-dspace"
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>" \
maintainer="Egon W. Stemle <egon.stemleg@eurac.edu>" \
org.label-schema.version=$LABEL_VERSION \
org.label-schema.build-date=$LABEL_BUILD_DATE \
org.label-schema.vcs-url=$LABEL_VCS_URL
# install git
......@@ -33,4 +31,5 @@ RUN mkdir /tmp/sql/
COPY adapt_utilities_sql.sh /tmp/sql/
RUN /tmp/sql/adapt_utilities_sql.sh
LABEL org.label-schema.version=$LABEL_VERSION \
org.label-schema.build-date=$LABEL_BUILD_DATE
......@@ -4,9 +4,18 @@ set -e
VERSION=${1:-latest}
TYPE=${2:-staging}
docker build --build-arg LABEL_VERSION=$VERSION -t gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/dspace:$VERSION . -f Dockerfile.dspace
docker build --build-arg LABEL_VERSION=$VERSION -t gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/nginx:$VERSION . -f Dockerfile.nginx
docker build --build-arg LABEL_VERSION=$VERSION -t gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/postgres:$VERSION . -f Dockerfile.postgres
docker build \
--build-arg LABEL_VERSION=$VERSION \
--build-arg LABEL_BUILD_DATE="$(date -R)" \
-t gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/dspace:$VERSION . -f Dockerfile.dspace
docker build \
--build-arg LABEL_VERSION=$VERSION \
--build-arg LABEL_BUILD_DATE="$(date -R)" \
-t gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/nginx:$VERSION . -f Dockerfile.nginx
docker build \
--build-arg LABEL_VERSION=$VERSION \
--build-arg LABEL_BUILD_DATE="$(date -R)" \
-t gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/postgres:$VERSION . -f Dockerfile.postgres
docker push gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/dspace:$VERSION
docker push gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/nginx:$VERSION
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment