alert-proxy
The alert-proxy image is built from ContainerFiles/alert-proxy. Security patches are applied by scripts/alert-proxy-cve-patching.sh.
This container packages the alert-proxy service for use in the stack. The build installs the required packages, applies security updates and configuration, and prepares the service for integration.
graph LR
A[Base image] --> B[Install packages]
B --> C[Apply CVE patches]
C --> D[Configure alert-proxy]
D --> E[Container ready]
ContainerFile used for the build
# syntax = docker/dockerfile:1
# This Dockerfile uses multi-stage build to customize DEV and PROD images:
# https://docs.docker.com/develop/develop-images/multistage-build/
ARG VENV_TAG=3.12-latest
FROM ghcr.io/rackerlabs/genestack-images/openstack-venv:${VENV_TAG} AS dependency_build
ARG CACHEBUST=0
ARG OS_VERSION=master
ARG OS_CONSTRAINTS=master
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update && apt-get upgrade -y \
&& apt-get install --no-install-recommends -y \
build-essential \
git
RUN git clone https://github.com/rackerlabs/alert-proxy.git /opt/alert-proxy
RUN /var/lib/openstack/bin/pip install -r /opt/alert-proxy/requirements.txt
COPY scripts/alert-proxy-cve-patching.sh /opt/
RUN bash /opt/alert-proxy-cve-patching.sh
RUN find / -name '*.pyc' -delete \
&& find / -name '*.pyo' -delete \
&& find / -name '__pycache__' -delete \
&& find / -name '*.whl' -delete \
&& rm -f /var/lib/openstack/lib/python*/site-packages/slapdtest/certs/client.key \
&& rm -f /var/lib/openstack/lib/python*/site-packages/slapdtest/certs/server.key
FROM python:3.12-slim-trixie
LABEL maintainer="Rackspace"
LABEL vendor="Rackspace OpenStack Team"
LABEL org.opencontainers.image.name="alert-proxy"
LABEL org.opencontainers.image.description="Alert-Proxy built for the enterprise."
COPY --from=dependency_build /var/lib/openstack /var/lib/openstack
COPY --from=dependency_build /opt/alert-proxy /opt/alert-proxy
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update && apt-get upgrade -y \
&& apt-get install --no-install-recommends -y libxml2 curl \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* \
&& find / -name '*.pyc' -delete \
&& find / -name '*.pyo' -delete \
&& find / -name '__pycache__' -delete \
&& groupadd --system --gid 42424 alert-proxy \
&& useradd --system --gid 42424 --uid 42424 --shell /sbin/nologin --create-home --home /var/lib/alert-proxy alert-proxy \
&& mkdir -p /var/lib/openstack/etc/alert-proxy \
&& mkdir -p /opt/alert-proxy \
&& ln -s /var/lib/openstack/etc/alert-proxy /etc/alert-proxy \
&& chown alert-proxy:alert-proxy -R /opt/alert-proxy \
&& chown alert-proxy:alert-proxy -h /etc/alert-proxy \
&& chown -R alert-proxy:alert-proxy /var/lib/openstack/etc/alert-proxy
# Set the environment variables for the alert-proxy venv
ENV PATH="/var/lib/openstack/bin:$PATH"
# Set the working directory
WORKDIR /opt/alert-proxy/src
# Set the user and group to match the original build
USER 42424:42424
# Set the entrypoint to the uwsgi command
ENTRYPOINT ["uwsgi"]
# Set the default arguments for the uwsgi command
CMD ["--ini", "/etc/alert-proxy/uwsgi.ini"]
Build Arguments
| Argument | Default |
|---|---|
| VENV_TAG | 3.12-latest |
| CACHEBUST | 0 |
Build Command
Dependencies
- Builds From OpenStack Virtual Environment
Container Image
The container image is available on Github Container Registry.