prepare for docker hub

This commit is contained in:
Wolfgang Hottgenroth 2019-06-12 12:42:50 +02:00
parent e49ae83977
commit 7b2e975acd
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F
2 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,7 @@ stages:
variables:
IMAGE_NAME: registry.gitlab.com/wolutator/mosquitto-with-auth
HUB_IMAGE_NAME: wollud1969/mosquitto-with-auth
build:
stage: build
@ -54,8 +55,11 @@ dockerize:
- build
script:
- VERSION=`cat generated-version.txt`
- docker build --tag $IMAGE_NAME:latest --tag $IMAGE_NAME:$VERSION .
- docker build --tag $IMAGE_NAME:latest --tag $IMAGE_NAME:$VERSION --tag $HUB_IMAGE_NAME:latest --tag $HUB_IMAGE_NAME:$VERSION .
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker push $IMAGE_NAME:latest
- docker push $IMAGE_NAME:$VERSION
- docker login -u $DOCKER_HUB_LOGIN -p $DOCKER_HUB_PASSWORD
- docker push $HUB_IMAGE_NAME:latest
- docker push $HUB_IMAGE_NAME:$VERSION

View File

@ -2,6 +2,7 @@ FROM debian:latest
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
LABEL ImageName="registry.gitlab.com/wolutator/mosquitto-with-auth"
LABEL AlternativeImageName="wollud1969/mosquitto-with-auth"
ARG MOSQ_USER="mosquitto"
ARG MOSQ_UID="1883"