[v27] Change base from Alpine to Ubuntu
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
0fdc51f271
commit
3d49a62772
@ -34,4 +34,4 @@ steps:
|
||||
# tags
|
||||
tags:
|
||||
- 'latest'
|
||||
- 'v26'
|
||||
- 'v27'
|
||||
|
@ -7,23 +7,29 @@ ARG ANSIBLE_LINT_VERSION=6.22.0
|
||||
# renovate: datasource=pypi depName=yamllint versioning=pep440
|
||||
ARG YAMLLINT_VERSION=1.33.0
|
||||
|
||||
# alpine version
|
||||
FROM alpine:3.19
|
||||
# ubuntu base
|
||||
FROM ubuntu:latest
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# install software
|
||||
RUN apk update
|
||||
RUN apk add --no-cache \
|
||||
build-base \
|
||||
ca-certificates \
|
||||
git \
|
||||
libffi-dev \
|
||||
openssh \
|
||||
python3 \
|
||||
python3-dev \
|
||||
py3-pip
|
||||
# prepare basic stuff
|
||||
RUN set -e && ln -sf bash /bin/sh
|
||||
RUN set -e \
|
||||
&& apt -y update \
|
||||
&& apt -y upgrade \
|
||||
&& apt -y install --no-install-recommends --no-install-suggests \
|
||||
ca-certificates \
|
||||
git \
|
||||
ssh \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
wget
|
||||
|
||||
# cleanup
|
||||
RUN rm -rf /var/cache/apk/*
|
||||
RUN set -e \
|
||||
&& apt -y autoremove \
|
||||
&& apt clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# arguments
|
||||
ARG ANSIBLE_VERSION
|
||||
@ -31,16 +37,13 @@ ARG ANSIBLE_LINT_VERSION
|
||||
ARG YAMLLINT_VERSION
|
||||
|
||||
# install ansible + linters
|
||||
RUN pip3 install --use-pep517 --ignore-installed --break-system-packages \
|
||||
RUN pip3 install --use-pep517 --ignore-installed \
|
||||
ansible-core==${ANSIBLE_VERSION} \
|
||||
ansible-lint==${ANSIBLE_LINT_VERSION} \
|
||||
yamllint==${YAMLLINT_VERSION}
|
||||
|
||||
# download collections
|
||||
RUN wget -O /tmp/ansible-posix.tar.gz https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/ansible-posix-1.5.4.tar.gz
|
||||
|
||||
# install ansible collections
|
||||
RUN ansible-galaxy collection install /tmp/ansible-posix.tar.gz
|
||||
RUN ansible-galaxy collection install ansible.posix
|
||||
RUN ansible-galaxy collection install community.docker
|
||||
RUN ansible-galaxy collection install community.general
|
||||
RUN ansible-galaxy collection install community.mysql
|
||||
|
@ -1,7 +1,7 @@
|
||||
[![Build Status](https://ci.simoncor.net/api/badges/siempie/ansible-deployment-container/status.svg)](https://ci.simoncor.net/siempie/ansible-deployment-container)
|
||||
|
||||
# Usage
|
||||
Small Alpine container useful for an Ansible linter pipeline. Useful for CI/CD pipelines.
|
||||
Small Ubuntu container useful for an Ansible linter pipeline. Useful for CI/CD pipelines.
|
||||
|
||||
# Preinstalled software
|
||||
- ansible-core
|
||||
|
Loading…
Reference in New Issue
Block a user