OpenStack Images¶
OpenStack image Dockerfiles are built from the repository root.
The build has two base images which are used by the service image, which is a multi-stage build with two stages:
The
basebase image, which defaults to being theBASE_RUNTIMEfor all the service images, installs the runtime dependencies.The
venv_builderbase image, which defaults to beingBASE_VENV_BUILDERfor all service images, installs build dependencies and creates a virtual environment at/var/lib/openstackusinguv.Each service image is made up of two stages, the first stage extends
BASE_VENV_BUILDERto install the project and its dependencies into the virtual environment, and the second stage copies that environment into the leanBASE_RUNTIMEimage.
Package selection is driven by bindep data files:
bindep.txtdefines OS packages installed at runtime, resolved per-image in the build stage.pydep.txtdefines additional Python packages installed into the venv.
Build the shared images first:
docker build -f venv_builder/Dockerfile \
-t quay.io/airshipit/venv_builder:local \
.
docker build -f base/Dockerfile \
-t quay.io/airshipit/base:local \
.
The pages below show per-image commands. Override
BASE_VENV_BUILDER, and BASE_RUNTIME as needed.
Each image has $PROJECT_REPO and $PROJECT_REF, such as
IRONIC_REPO and IRONIC_REF for the ironic image which are
the git repo and the git reference used to fetch the source code.