Skip to content

Commit

Permalink
use apt ansible
Browse files Browse the repository at this point in the history
  • Loading branch information
Manpreet Singh Nehra committed Oct 13, 2023
1 parent 26c3933 commit c1d0fde
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## v2.6.1

1. Terraform 1.6.1
1. ansible 2.15.4
1. helm 3.12.3
1. diff 3.8.1
1. git 0.12.0
1. s3 0.14.0
1. secrets 4.1.1
1. helmfile 0.157.0
1. node 18.13.0
1. ansible-lint 6.20.0
1. gitlab-terraform v1.6.0
1. azure-cli 2.53.0

## v2.5.7

1. Terraform 1.5.7
Expand Down
15 changes: 2 additions & 13 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETARCH

FROM python:3 as build
ENV VENV_PATH=/opt/packages \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
RUN python3 -m venv --copies $VENV_PATH
ENV PATH="$VENV_PATH/bin:$PATH"
RUN pip3 install ansible ansible-lint six --no-cache-dir

FROM debian:${DISTRO}
LABEL org.opencontainers.image.authors "Manpreet Singh Nehra"
LABEL org.opencontainers.image.source "https://github.com/iaacautomation/devops-tools/tree/main/deploy"
Expand All @@ -22,7 +12,7 @@ LABEL org.opencontainers.image.documentation "https://github.com/iaacautomation/
LABEL org.opencontainers.image.description "CI Tools Image for CI PIpelines"
LABEL org.opencontainers.image.base.name "debian:${DISTRO}"
LABEL org.opencontainers.image.revision v2.6.1
LABEL build.date 20231013(YYYYMMDD))
LABEL build.date 202310(YYYYMMDD))
ARG TERRAFORM_VERSION=1.6.1
ENV DEBIAN_FRONTEND=noninteractive
ARG HELMFILE_VERSION=0.157.0
Expand All @@ -31,7 +21,7 @@ ARG TARGETARCH
WORKDIR /tmp

### Install utilities and packages
RUN apt-get update && apt-get -y dist-upgrade && apt-get install --no-install-recommends -y jq libpython3.11 curl wget git unzip ca-certificates curl gnupg apt-transport-https nodejs openssh-client idn2 && apt-get clean && rm -rf /var/lib/apt/lists/* -rf
RUN apt-get update && apt-get -y dist-upgrade && apt-get install --no-install-recommends -y jq libpython3.11 curl wget git unzip ca-certificates curl gnupg apt-transport-https nodejs openssh-client idn2 ansible ansible-lint && apt-get clean && rm -rf /var/lib/apt/lists/* -rf

## Setup Kubernetes key and repo for kubectl
RUN curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg && echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list
Expand All @@ -50,7 +40,6 @@ RUN wget -q -O terraform.zip https://releases.hashicorp.com/terraform/${TERRAFOR
RUN apt-get update && apt-get install -y kubectl helm && apt-get clean && rm -rf /var/lib/apt/lists/* -rf

ENV VIRTUAL_ENV=/opt/packages
COPY --from=build $VIRTUAL_ENV $VIRTUAL_ENV
RUN wget https://gitlab.com/gitlab-org/terraform-images/-/raw/${GITLAB_TERRAFORM_VERSION}/src/bin/gitlab-terraform.sh -O /usr/local/bin/gitlab-terraform && chmod +x /usr/local/bin/gitlab-terraform
ENV PATH=$VIRTUAL_ENV/bin:$PATH:/usr/local/tfenv/bin
ENV HELM_PLUGINS=/usr/local/share/helm/plugins
Expand Down

0 comments on commit c1d0fde

Please sign in to comment.