diff --git a/Dockerfile b/Dockerfile index d1a6fc45..835613c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ FROM centos:centos7 +ARG RELEASE MAINTAINER Tim Vaillancourt RUN yum install -y https://www.percona.com/redir/downloads/percona-release/redhat/latest/percona-release-0.1-4.noarch.rpm epel-release && \ yum install -y Percona-Server-MongoDB-34-tools zbackup && yum clean all && \ - curl -Lo /usr/bin/mongodb-consistent-backup https://github.com/Percona-Lab/mongodb_consistent_backup/releases/download/1.0.2/mongodb-consistent-backup.el7.centos.x86_64 && \ + curl -Lo /usr/bin/mongodb-consistent-backup https://github.com/Percona-Lab/mongodb_consistent_backup/releases/download/$RELEASE/mongodb-consistent-backup.el7.centos.x86_64 && \ chmod +x /usr/bin/mongodb-consistent-backup ENTRYPOINT ["mongodb-consistent-backup"] CMD ["--help"] diff --git a/Makefile b/Makefile index 8bbf5532..d0ebee6b 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ PREFIX?=/usr/local BASEDIR?=$(DESTDIR)$(PREFIX) BINDIR?=$(BASEDIR)/bin SHAREDIR?=$(BASEDIR)/share +DOCKER_TAG?="$(NAME):$(VERSION)" all: bin/mongodb-consistent-backup @@ -34,7 +35,7 @@ rpm: bin/mongodb-consistent-backup rpmbuild -D "_topdir $(PWD)/build/rpm" -D "version $(VERSION)" -bb scripts/$(NAME).spec docker: - docker build --no-cache -t mongodb_consistent_backup . + docker build --no-cache --tag $(DOCKER_TAG) --build-arg "RELEASE=$(VERSION)" . clean: rm -rf bin build $(NAME).egg-info tmp 2>/dev/null diff --git a/VERSION b/VERSION index 6d7de6e6..21e8796a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.2 +1.0.3