Skip to content

Commit 989cab9

Browse files
Simplify 'make docker', take in release from VERSION file
1 parent 10005e1 commit 989cab9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
FROM centos:centos7
2+
ARG RELEASE
23
MAINTAINER Tim Vaillancourt <tim.vaillancourt@percona.com>
34
RUN yum install -y https://www.percona.com/redir/downloads/percona-release/redhat/latest/percona-release-0.1-4.noarch.rpm epel-release && \
45
yum install -y Percona-Server-MongoDB-34-tools zbackup && yum clean all && \
5-
curl -Lo /usr/bin/mongodb-consistent-backup https://github.com/Percona-Lab/mongodb_consistent_backup/releases/download/1.0.3/mongodb-consistent-backup.el7.centos.x86_64 && \
6+
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 && \
67
chmod +x /usr/bin/mongodb-consistent-backup
78
ENTRYPOINT ["mongodb-consistent-backup"]
89
CMD ["--help"]

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ PREFIX?=/usr/local
77
BASEDIR?=$(DESTDIR)$(PREFIX)
88
BINDIR?=$(BASEDIR)/bin
99
SHAREDIR?=$(BASEDIR)/share
10+
DOCKER_TAG?="$(NAME):$(VERSION)"
1011

1112

1213
all: bin/mongodb-consistent-backup
@@ -35,7 +36,7 @@ rpm: bin/mongodb-consistent-backup
3536
rpmbuild -D "_topdir $(PWD)/build/rpm" -D "version $(VERSION)" -bb scripts/$(NAME).spec
3637

3738
docker:
38-
docker build --no-cache -t mongodb_consistent_backup .
39+
docker build --no-cache --tag $(DOCKER_TAG) --build-arg "RELEASE=$(VERSION)" .
3940

4041
clean:
4142
rm -rf bin build $(NAME).egg-info tmp 2>/dev/null

0 commit comments

Comments
 (0)