ARG RELEASE |
ARG LAUNCHPAD_BUILD_ARCH |
LABEL org.opencontainers.image.ref.name=ubuntu |
LABEL org.opencontainers.image.version=22.04 |
ADD file:82f38ebced7b2756311fb492d3d44cc131b22654e8620baa93883537a3e355aa in / |
CMD ["/bin/bash"] |
LABEL maintainer=emine@felcloud.tn |
LABEL version=0.1 |
LABEL description=This is a custom Docker Image for Pulumi and Ansible run |
ARG DEBIAN_FRONTEND=noninteractive |
ARG branch=main |
ENV WORKDIR_ANSIBLE=/home/cloud/ansible-pulumi |
ENV PULUMI_VERSION=3.143.0 |
ENV PULUMI_SKIP_UPDATE_CHECK=True |
ENV ENVDIR=/etc/ansible |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c apt update |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c apt install -y --no-install-recommends vim git python3-venv jq curl python3-pip openssh-server gnupg iputils-ping build-essential python3-dev |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c apt install -y --no-install-recommends tig gnupg2 pwgen && apt remove --purge -y --no-install-recommends python3-pip |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c groupadd cloud |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c useradd -m -d /home/cloud -s /bin/bash -g cloud -G sudo cloud |
WORKDIR /home/cloud |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c mkdir -p /home/cloud/.ssh/ |
COPY file:efae020abdcf527ecd0d2eb88e8d16d2a82c9c74e8b6acba6c78b05f2b00ae57 in /home/cloud/.ssh/id_rsa |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c chmod 0600 /home/cloud/.ssh/id_* |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c touch /home/cloud/.ssh/known_hosts |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c ssh-keyscan git.felcloud.io >> /home/cloud/.ssh/known_hosts |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c mkdir -p /home/cloud/custom_files |
COPY dir:0426c09392fa8d1ff8e8c2080443366cb99de7b36c1e4de3b0b914a48ef0c840 in /home/cloud/custom_files |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c mkdir -p $WORKDIR_ANSIBLE |
COPY file:abb5a003e2cc90a9d3705d1a1694853633352c8a46f63321c099fb2742798afd in /home/cloud/entrypoint.sh |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c chmod +x /home/cloud/entrypoint.sh |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c chown -R cloud:cloud /home/cloud |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c mkdir -p $ENVDIR |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c chown -R cloud:cloud $ENVDIR |
WORKDIR /home/cloud/ansible-pulumi |
USER cloud |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c echo "export PATH=$PATH:/home/cloud/.pulumi/bin:/home/cloud/venv/bin" >> /home/cloud/.bashrc |
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/cloud/.pulumi/bin:/home/cloud/venv/bin |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c echo "Host git.felcloud.io" >> /home/cloud/.ssh/config && echo "User git" >> /home/cloud/.ssh/config && echo "IdentityFile /home/cloud/.ssh/id_rsa" >> /home/cloud/.ssh/config && echo "StrictHostKeyChecking no" >> /home/cloud/.ssh/config && echo "IdentitiesOnly yes" >> /home/cloud/.ssh/config |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c git clone git@git.felcloud.io:felcloud/ansible_core_main_playbooks.git $WORKDIR_ANSIBLE/ && cd $WORKDIR_ANSIBLE/ && git checkout $branch |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c mkdir -p $WORKDIR_ANSIBLE/roles/ && mkdir -p $WORKDIR_ANSIBLE/pulumi_state |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c python3 -m venv /home/cloud/venv && /home/cloud/venv/bin/pip install --upgrade pip wheel setuptools python-openstackclient && /home/cloud/venv/bin/pip install -r $WORKDIR_ANSIBLE/requirements.txt |
|2 DEBIAN_FRONTEND=noninteractive branch=main /bin/sh -c curl -fsSL https://get.pulumi.com | sh -s -- --version $PULUMI_VERSION && /home/cloud/.pulumi/bin/pulumi login file://$WORKDIR_ANSIBLE/pulumi_state |
ENTRYPOINT ["/home/cloud/entrypoint.sh"] |