
1. The first goal is to let user customize the base image of the component by passing FROM=myimage during the build process. This would let any project leveraging Airship ensure that the base image is matching the security requirements for that project. This will also ease the control of the /etc/apt/source.list and thereby the result of apt-get update/upgrade procedure. 2. The above goal is achievable by using docker-ce feature such as: ARG FROM="defaultbaseimage:xx" FROM ${FROM} For this reason, the installation of docker.io in the Zuul gating is beeing replaced by docker-ce. 3. Third Goal is to bring consistency with the other compoenents leveraging Helm such as the openstack-helm and potentially use bindep the same way the LOCI images are to ensure 4. The new syntax in the Dockerfile is still commented out until the associated image builder have been updated to use docker-ce as they have been for the LOCI images. Change-Id: Id91284433d6e4c3560ce5b261f29cc5f2e8e6048
40 lines
705 B
Docker
40 lines
705 B
Docker
ARG FROM=python:3.5
|
|
FROM ${FROM}
|
|
|
|
MAINTAINER Armada Team
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
ENV LANG=C.UTF-8
|
|
ENV LC_ALL=C.UTF-8
|
|
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT ["./entrypoint.sh"]
|
|
CMD ["server"]
|
|
|
|
RUN mkdir -p /armada && \
|
|
apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
netbase \
|
|
curl \
|
|
git && \
|
|
useradd -u 1000 -g users -d /armada armada && \
|
|
rm -rf \
|
|
/root/.cache \
|
|
/var/lib/apt/lists/*
|
|
|
|
WORKDIR /armada
|
|
|
|
COPY requirements.txt /tmp/
|
|
RUN pip3 install -r /tmp/requirements.txt
|
|
|
|
COPY . /armada
|
|
|
|
RUN \
|
|
mv /armada/etc/armada /etc/ && \
|
|
cd /armada && \
|
|
chown -R armada:users /armada && \
|
|
python3 setup.py install
|
|
|
|
USER armada
|