From b6db0f7d805bd2b2c1310324c1abc889907ca270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Thu, 5 Jan 2017 20:01:10 +0100 Subject: [PATCH] changed build hook --- Dockerfile | 13 +++++++++++++ Dockerfile.elasticsearch | 1 + Dockerfile.nginx | 1 + Dockerfile.postgresql | 1 + hooks/build | 2 +- hooks/push | 2 ++ 6 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..32e80a5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +MAINTAINER André Bauer +ARG BUILD_DATE + +LABEL org.label-schema.build-date="$BUILD_DATE" \ + org.label-schema.name="Zammad" \ + org.label-schema.license="AGPL-3.0" \ + org.label-schema.description="Docker container for Zammad - dummy Dockerfile for DockerHub autobuilds" \ + org.label-schema.url="https://zammad.org" \ + org.label-schema.vcs-url="https://github.com/zammad/zammad" \ + org.label-schema.vcs-type="Git" \ + org.label-schema.vendor="Zammad" \ + org.label-schema.schema-version="1.0" \ + org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up --build" diff --git a/Dockerfile.elasticsearch b/Dockerfile.elasticsearch index 895e107..b3c526c 100644 --- a/Dockerfile.elasticsearch +++ b/Dockerfile.elasticsearch @@ -1,5 +1,6 @@ FROM elasticsearch MAINTAINER André Bauer +ARG BUILD_DATE LABEL org.label-schema.build-date="$BUILD_DATE" \ org.label-schema.name="Zammad" \ diff --git a/Dockerfile.nginx b/Dockerfile.nginx index f22a22a..89a06d0 100644 --- a/Dockerfile.nginx +++ b/Dockerfile.nginx @@ -1,5 +1,6 @@ FROM nginx MAINTAINER André Bauer +ARG BUILD_DATE LABEL org.label-schema.build-date="$BUILD_DATE" \ org.label-schema.name="Zammad" \ diff --git a/Dockerfile.postgresql b/Dockerfile.postgresql index 8f3f1b2..1cb955a 100644 --- a/Dockerfile.postgresql +++ b/Dockerfile.postgresql @@ -1,5 +1,6 @@ FROM postgres MAINTAINER André Bauer +ARG BUILD_DATE LABEL org.label-schema.build-date="$BUILD_DATE" \ org.label-schema.name="Zammad" \ diff --git a/hooks/build b/hooks/build index 911e07b..dd07653 100755 --- a/hooks/build +++ b/hooks/build @@ -8,6 +8,6 @@ for DOCKER_IMAGE in ${DOCKER_IMAGES}; do echo "Build Zammad Docker image ${DOCKER_IMAGE} for DockerHubs ${DOCKER_REPO}:${DOCKER_IMAGE} repo" - docker build --build-arg BUILD_DATE=$(date -u +”%Y-%m-%dT%H:%M:%SZ”) -t ${DOCKER_REPO}:${DOCKER_IMAGE} - < Dockerfile.${DOCKER_IMAGE} + docker build --build-arg BUILD_DATE=$(date -u +”%Y-%m-%dT%H:%M:%SZ”) -t ${DOCKER_REPO}:${DOCKER_IMAGE} -f Dockerfile.${DOCKER_IMAGE} . done diff --git a/hooks/push b/hooks/push index d992657..3bfe51b 100755 --- a/hooks/push +++ b/hooks/push @@ -5,6 +5,8 @@ . "hooks/config" +#exit 0 + for DOCKER_IMAGE in ${DOCKER_IMAGES}; do echo "Push Zammad Docker image ${DOCKER_IMAGE} to DockerHubs ${DOCKER_REPO}:${DOCKER_IMAGE} repo"