0
0
mirror of https://github.com/thegeeklab/wp-ansible.git synced 2024-11-09 17:10:41 +00:00
wp-ansible/Containerfile.multiarch

40 lines
1.4 KiB
Plaintext

FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.22@sha256:0b55ab82ac2a54a6f8f85ec8b943b9e470c39e32c109b766bbc1b801f3fa8d3b as build
ARG TARGETOS
ARG TARGETARCH
ADD . /src
WORKDIR /src
RUN make build
FROM docker.io/python:3.12-alpine@sha256:25a82f6f8b720a6a257d58e478a0a5517448006e010c85273f4d9c706819478c
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.title="wp-ansible"
LABEL org.opencontainers.image.url="https://github.com/thegeeklab/wp-ansible"
LABEL org.opencontainers.image.source="https://github.com/thegeeklab/wp-ansible"
LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/wp-ansible"
ARG TARGETOS
ARG TARGETARCH
ARG ANSIBLE_VERSION
# renovate: datasource=pypi depName=ansible
ENV ANSIBLE_VERSION="${ANSIBLE_VERSION:-9.3.0}"
RUN apk --update add --virtual .build-deps python3-dev libffi-dev build-base && \
apk add --no-cache bash git curl rsync openssh-client sshpass && \
apk upgrade --no-cache libcrypto3 libssl3 && \
pip install -qq --no-cache-dir --upgrade pip && \
pip install -qq --no-cache-dir ansible=="${ANSIBLE_VERSION}" \
boto3 hcloud pywinrm passlib jsonschema && \
apk del .build-deps && \
rm -rf /var/cache/apk/* && \
rm -rf /tmp/* && \
rm -rf /root/.cache/
COPY --from=build /src/dist/wp-ansible /bin/wp-ansible
ENTRYPOINT ["/bin/wp-ansible"]