Build heat-docker-agents for specific versions
Don't hard-code the openstack version in the script but require it at
build time instead. This patch makes it possible to pass the openstack
version to use by passing `OPENSTACK_RELEASE` as a build requirement for
docker.
docker build -t tripleoupstream/heat-docker-agents:mitaka --build-arg OPENSTACK_RELEASE=mitaka .
Change-Id: I3df8f2d1dc73fb9a9579a175f9851376db12b176
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
FROM centos:7
|
||||
MAINTAINER "Jeff Peeler" <jpeeler@redhat.com>
|
||||
|
||||
ARG OPENSTACK_RELEASE
|
||||
LABEL openstack_release=$OPENSTACK_RELEASE
|
||||
ENV container docker
|
||||
ENV DOCKER_HOST unix:///var/run/docker.sock
|
||||
|
||||
|
||||
@@ -2,7 +2,14 @@
|
||||
|
||||
# Doing this in a separate script lets us do it step by step with a single docker layer.
|
||||
|
||||
yum -y install http://rdoproject.org/repos/openstack-liberty/rdo-release-liberty.rpm
|
||||
if [ -z "$OPENSTACK_RELEASE" ]; then
|
||||
echo "Please, set OPENSTACK_RELEASE to the desired openstack version."
|
||||
echo "You can run the build command as: "
|
||||
echo "OPENSTACK_RELEASE=mitaka docker build -t tripleoupstream/heat-docker-agents:\$OPENSTACK_RELEASE --build-arg OPENSTACK_RELEASE=\$OPENSTACK_RELEASE ."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
yum -y install http://rdoproject.org/repos/openstack-$OPENSTACK_RELEASE/rdo-release-$OPENSTACK_RELEASE.rpm
|
||||
yum update -y
|
||||
yum install -y \
|
||||
initscripts \
|
||||
|
||||
Reference in New Issue
Block a user