diff --git a/Dockerfile b/Dockerfile index 5e47985..f0af0f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM openpolicyagent/conftest:v0.48.0 AS conftest -FROM alpine:3.18 +FROM alpine:3.19 ARG VERSION_HADOLINT="v2.12.0" ARG VERSION_KUBECTL="v1.29.0" @@ -16,21 +16,21 @@ ADD https://storage.googleapis.com/kubernetes-release/release/${VERSION_KUBECTL} WORKDIR /cdp RUN apk -v --no-cache add tar ca-certificates python3 python3-dev skopeo coreutils podman py3-setuptools py3-pip py3-wheel\ - groff less mailcap curl openrc build-base libgit2-dev autoconf automake libtool jq git openssh unzip \ + groff less mailcap curl openrc build-base libgit2-dev autoconf automake libtool jq git openssh unzip iptables-legacy\ && chmod +x /bin/hadolint && chmod +x /bin/kubectl \ && if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi \ && if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi \ && ln -s /usr/lib/libcurl.so.4 /usr/lib/libcurl-gnutls.so.4 \ - && pip install awscli --break-system-packages \ + && pip install awscli build --break-system-packages \ && pip install --break-system-packages -r requirements.txt \ && apk -v add gettext \ && apk -v --no-cache --purge del py-pip autoconf automake libtool build-base libgit2-dev python3-dev \ - && curl -L https://get.helm.sh/helm-${VERSION_HELM}-linux-amd64.tar.gz | tar zxv -C /tmp/ --strip-components=1 linux-amd64/helm && mv /tmp/helm /bin/helm3 && chmod +x /bin/helm3 \ - && curl -L https://get.helm.sh/helm-${VERSION_HELM2}-linux-amd64.tar.gz | tar zxv -C /tmp/ --strip-components=1 linux-amd64/helm && mv /tmp/helm /bin/helm2 && chmod +x /bin/helm2 \ + && curl -sL https://get.helm.sh/helm-${VERSION_HELM}-linux-amd64.tar.gz | tar zxv -C /tmp/ --strip-components=1 linux-amd64/helm && mv /tmp/helm /bin/helm3 && chmod +x /bin/helm3 \ + && curl -sL https://get.helm.sh/helm-${VERSION_HELM2}-linux-amd64.tar.gz | tar zxv -C /tmp/ --strip-components=1 linux-amd64/helm && mv /tmp/helm /bin/helm2 && chmod +x /bin/helm2 \ && helm3 plugin install https://github.com/helm/helm-2to3 \ && rm -rf /var/lib/apk/lists/* && rm -rf /var/cache/apk/* /root/.cache /usr/lib/python3.8/site-packages/pip /usr/lib/python3.8/__pycache__ /usr/lib/python3.8/site-packages/awscli/examples /usr/lib/python3.8/site-packages/config-3.8* \ - && mkdir -p /root/.docker -RUN python setup.py install && rm -rf /cdp/..?* .[!.]* + && mkdir -p /root/.docker && iptables-legacy-save +RUN python -m build -n -x && rm -rf /cdp/..?* .[!.]* # Options Podman diff --git a/setup.py b/setup.py index a18e77d..f1c30d2 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ def find_version(*file_paths): setup_requires=['pytest-runner'], tests_require=['pytest', 'freezegun'], license='Apache License 2.0', - classifiers=( + classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', @@ -70,7 +70,7 @@ def find_version(*file_paths): 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', - ), + ], ) setup(**setup_options)