Ian Howell 116eb2cc93 Add a Helm chart collator
This adds a Dockerfile for an image which works as a Helm chart
repository. Charts can be pulled from either pre-existing
Helm repos or from git repos.

Change-Id: I860394eea3c322f2b142ea00dd7cc0a6916c34d5
2020-07-02 14:27:46 -05:00

37 lines
953 B
Docker

FROM ubuntu:20.04 as chart-collator
SHELL ["bash", "-exc"]
ENV DEBIAN_FRONTEND noninteractive
# Update distro and install ansible and git
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends \
python3-minimal \
python3-pip \
python3-apt \
python3-setuptools \
openssh-client \
jq \
git && \
pip3 install --upgrade wheel && \
pip3 install --upgrade ansible && \
pip3 install --upgrade jmespath && \
pip3 install --upgrade yq && \
rm -rf /var/lib/apt/lists/*
COPY playbooks /opt/playbooks
ARG CHARTS=""
RUN ansible-playbook -v /opt/playbooks/create_repository.yaml \
-i /opt/playbooks/inventory.yaml \
--extra-vars "CHARTS=$CHARTS"
FROM chartmuseum/chartmuseum:latest
COPY --from=chart-collator /charts /charts
ENTRYPOINT /chartmuseum --debug --port=8080 \
--storage="local" \
--storage-local-rootdir=/charts