Closed dn1s closed 3 years ago
Dockerfile:
FROM alpine:latest
WORKDIR /app
RUN apk add --no-cache python3
RUN apk add --no-cache gcc
RUN apk add --no-cache openssh-client
RUN apk add --no-cache git
RUN apk add --no-cache python3-dev
RUN apk add --no-cache musl-dev
RUN apk add --no-cache openssl-dev
RUN apk add --no-cache libffi-dev
RUN apk add --no-cache make
RUN apk add --no-cache libxml2-dev
RUN apk add --no-cache libxslt-dev
RUN apk add --no-cache libxslt
RUN apk add --no-cache libffi
RUN apk add --no-cache libxml2
RUN apk add --no-cache py3-pip
RUN apk add --no-cache cargo
RUN pip3 install --upgrade pip
RUN pip3 install pyvcloud
RUN pip3 install ciso8601
RUN pip3 install GitPython
RUN pip3 install infoblox-client
RUN pip3 install jira
RUN pip3 install paramiko
RUN pip3 install ruamel.yaml
RUN pip3 install PyCryptodome
# Clean up some unneeded packages
RUN apk del --no-cache cargo
RUN apk del --no-cache gcc
RUN apk del --no-cache python3-dev
RUN apk del --no-cache musl-dev
RUN apk del --no-cache openssl-dev
RUN apk del --no-cache make
RUN apk del --no-cache libxslt-dev
RUN apk del --no-cache libxml2-dev
# mkdir tmp && cp -av ../../python_helper_modules/*{py,json} tmp/
COPY *py ./
COPY tmp/*py ./modules/
COPY tmp/*json ./modules/
ENV PATH="/app:${PATH}"
ADD ./bash_aliases /app/bash_aliases
# This will create a ssh agent inside container
# necessary to manage puppet ENC repo
ENTRYPOINT ssh-agent > env ; source env ; rm env ; /bin/ash -l
Fix was to update to python 3.9.5 from alpine 3.14 repo.
After rebuilding an existing container we experienced the issue that it's not possible to delete nics anymore.
Code snipped we use to delete a nic:
Error message:
this used to work like a charm. But after rebuilding the container it keeps on forgetting the end tag of network connection section instead it adds whole Vapp Resource to the request which fails obviously:
shortend
Installed pip packages:
Pinning versions did not help in the slightest. I don't understand why the parser would randomly break there and only in this function.
Used software: vCloud Director version: 9.7.0.14534864 python3.8