From 04b6e19148ed04f5ab069d4b6d2e113601b26d0e Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Fri, 31 May 2024 11:55:50 -0500 Subject: [PATCH] Fix j2 in the ips image --- ips/Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ips/Dockerfile b/ips/Dockerfile index 968ebc9..46f646d 100644 --- a/ips/Dockerfile +++ b/ips/Dockerfile @@ -4,13 +4,19 @@ FROM hashicorp/terraform:latest as terraform FROM alpine:latest ENV PACKER_PLUGIN_PATH="/packer-plugins" +ENV PYENV_ROOT=/root/.pyenv +ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH COPY --from=packer /bin/packer /bin/ COPY --from=terraform /bin/terraform /bin/ COPY --from=kubectl-helm /usr/local/bin/kubectl /bin/ -RUN apk add --no-cache ansible aws-cli bash curl curl-dev git github-cli go gpg gpg-agent jq make mysql-client netcat-openbsd openssh-client openssh-keygen openssl python3 py3-pip py3-jmespath rsync sudo tar wget xorriso && \ +RUN apk add --no-cache ansible aws-cli bash build-base bzip2-dev curl curl-dev git github-cli git go gpg gpg-agent jq libffi-dev make mysql-client netcat-openbsd openssh-client openssh-keygen openssl openssl-dev readline-dev rsync sudo sqlite-dev tar tk-dev wget xorriso xz-dev zlib-dev && \ apk add --no-cache yq --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community && \ - pip install --break-system-packages j2cli && \ + git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \ + pyenv install 3.11 && \ + pyenv global 3.11 && \ + pip install --upgrade pip && \ + pip install --no-cache-dir j2cli jmespath && \ packer plugins install github.com/hashicorp/amazon && \ packer plugins install github.com/hashicorp/ansible && \ packer plugins install github.com/hashicorp/proxmox