Skip to content

Commit

Permalink
Support alpine3.20
Browse files Browse the repository at this point in the history
  • Loading branch information
guenhter committed Oct 2, 2024
1 parent 5a7c52c commit 682b391
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 6 deletions.
23 changes: 18 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,19 @@ build-alpine-319:
only:
- tags

build-alpine-320:
stage: build
variables:
ALPINE_IMAGE_SUFFIX: alpine-3.20
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.17-${ALPINE_IMAGE_SUFFIX}" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.17-${ALPINE_IMAGE_SUFFIX}" -t "$CI_REGISTRY_IMAGE:${ANSIBLE_CORE_217}-${ALPINE_IMAGE_SUFFIX}" -t "$DOCKER_HUB_REGISTRY_IMAGE:${ANSIBLE_CORE_217}-${ALPINE_IMAGE_SUFFIX}" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_217} --build-arg ANSIBLE_VERSION=${ANSIBLE_217} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_217} ansible-core/alpine320/
- docker push --all-tags "$CI_REGISTRY_IMAGE"
- docker logout
- docker login -u "$DOCKER_HUB_USERNAME" -p "$DOCKER_HUB_PASSWORD"
- docker push --all-tags "$DOCKER_HUB_REGISTRY_IMAGE"
only:
- tags

build-debian-bullseye:
stage: build
script:
Expand All @@ -207,9 +220,9 @@ build-debian-bullseye:
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.14-bullseye" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.14-bullseye" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_214-bullseye" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_214-bullseye" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_214} --build-arg ANSIBLE_VERSION=${ANSIBLE_214} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_214} ansible-core/debian-bullseye/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.14-bullseye-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.14-bullseye-slim" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_214-bullseye-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_214-bullseye-slim" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_214} --build-arg ANSIBLE_VERSION=${ANSIBLE_214} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_214} ansible-core/debian-bullseye-slim/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.15-bullseye" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.15-bullseye" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_215-bullseye" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_215-bullseye" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_215} --build-arg ANSIBLE_VERSION=${ANSIBLE_215} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_215} ansible-core/debian-bullseye/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.15-bullseye-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.15-bullseye-slim" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_215-bullseye-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_215-bullseye-slim" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_215} --build-arg ANSIBLE_VERSION=${ANSIBLE_215} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_215} ansible-core/debian-bullseye-slim/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.15-bullseye-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.15-bullseye-slim" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_215-bullseye-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_215-bullseye-slim" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_215} --build-arg ANSIBLE_VERSION=${ANSIBLE_215} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_215} ansible-core/debian-bullseye-slim/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.17-bullseye" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.17-bullseye" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_217-bullseye" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_217-bullseye" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_217} --build-arg ANSIBLE_VERSION=${ANSIBLE_217} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_217} ansible-core/debian-bullseye/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.17-bullseye-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.17-bullseye-slim" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_217-bullseye-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_217-bullseye-slim" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_217} --build-arg ANSIBLE_VERSION=${ANSIBLE_217} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_217} ansible-core/debian-bullseye-slim/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.17-bullseye-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.17-bullseye-slim" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_217-bullseye-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_217-bullseye-slim" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_217} --build-arg ANSIBLE_VERSION=${ANSIBLE_217} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_217} ansible-core/debian-bullseye-slim/
- docker push --all-tags "$CI_REGISTRY_IMAGE"
- docker logout
- docker login -u "$DOCKER_HUB_USERNAME" -p "$DOCKER_HUB_PASSWORD"
Expand All @@ -225,11 +238,11 @@ build-debian-bookworm:
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.14-bookworm" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.14-bookworm" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_214-bookworm" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_214-bookworm" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_214} --build-arg ANSIBLE_VERSION=${ANSIBLE_214} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_214} ansible-core/debian-bookworm/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.14-bookworm-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.14-bookworm-slim" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_214-bookworm-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_214-bookworm-slim" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_214} --build-arg ANSIBLE_VERSION=${ANSIBLE_214} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_214} ansible-core/debian-bookworm-slim/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.15-bookworm" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.15-bookworm" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_215-bookworm" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_215-bookworm" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_215} --build-arg ANSIBLE_VERSION=${ANSIBLE_215} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_215} ansible-core/debian-bookworm/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.15-bookworm-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.15-bookworm-slim" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_215-bookworm-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_215-bookworm-slim" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_215} --build-arg ANSIBLE_VERSION=${ANSIBLE_215} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_215} ansible-core/debian-bookworm-slim/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.15-bookworm-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.15-bookworm-slim" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_215-bookworm-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_215-bookworm-slim" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_215} --build-arg ANSIBLE_VERSION=${ANSIBLE_215} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_215} ansible-core/debian-bookworm-slim/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.16-bookworm" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.16-bookworm" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_216-bookworm" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_216-bookworm" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_216} --build-arg ANSIBLE_VERSION=${ANSIBLE_216} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_216} ansible-core/debian-bookworm/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.16-bookworm-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.16-bookworm-slim" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_216-bookworm-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_216-bookworm-slim" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_216} --build-arg ANSIBLE_VERSION=${ANSIBLE_216} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_216} ansible-core/debian-bookworm-slim/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.16-bookworm-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.16-bookworm-slim" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_216-bookworm-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_216-bookworm-slim" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_216} --build-arg ANSIBLE_VERSION=${ANSIBLE_216} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_216} ansible-core/debian-bookworm-slim/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.17-bookworm" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.17-bookworm" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_217-bookworm" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_217-bookworm" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_217} --build-arg ANSIBLE_VERSION=${ANSIBLE_217} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_217} ansible-core/debian-bookworm/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.17-bookworm-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.17-bookworm-slim" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_217-bookworm-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_217-bookworm-slim" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_217} --build-arg ANSIBLE_VERSION=${ANSIBLE_217} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_217} ansible-core/debian-bookworm-slim/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.17-bookworm-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:2.17-bookworm-slim" -t "$CI_REGISTRY_IMAGE:$ANSIBLE_CORE_217-bookworm-slim" -t "$DOCKER_HUB_REGISTRY_IMAGE:$ANSIBLE_CORE_217-bookworm-slim" --build-arg ANSIBLE_CORE_VERSION=${ANSIBLE_CORE_217} --build-arg ANSIBLE_VERSION=${ANSIBLE_217} --build-arg ANSIBLE_LINT=${ANSIBLE_LINT_217} ansible-core/debian-bookworm-slim/
- docker push --all-tags "$CI_REGISTRY_IMAGE"
- docker logout
- docker login -u "$DOCKER_HUB_USERNAME" -p "$DOCKER_HUB_PASSWORD"
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## v5.0.3

- Add Ubuntu 24.04
- Add Alpine 3.20
- Support Ansible 10 (Core 2.17)

## v5.0.2

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ This includes:
| Alpine 3.16 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/master/ansible-core/alpine316/Dockerfile) | `2.13-alpine-3.16` | `2.14-alpine-3.16` | `2.15-alpine-3.16` | `2.16-alpine-3.16` | `2.17-alpine-3.16` |
| Alpine 3.17 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/master/ansible-core/alpine317/Dockerfile) | `2.13-alpine-3.17` | `2.14-alpine-3.17` | `2.15-alpine-3.17` | `2.16-alpine-3.17` | `2.17-alpine-3.17` |
| Alpine 3.18 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/master/ansible-core/alpine318/Dockerfile) | `2.13-alpine-3.18` | `2.14-alpine-3.18` | `2.15-alpine-3.18` | `2.16-alpine-3.18` | `2.17-alpine-3.18` |
| Alpine 3.19 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/master/ansible-core/alpine318/Dockerfile) | `2.13-alpine-3.19` | `2.14-alpine-3.19` | `2.15-alpine-3.19` | `2.16-alpine-3.19` | `2.17-alpine-3.19` |
| Alpine 3.19 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/master/ansible-core/alpine319/Dockerfile) | `2.13-alpine-3.19` | `2.14-alpine-3.19` | `2.15-alpine-3.19` | `2.16-alpine-3.19` | `2.17-alpine-3.19` |
| Alpine 3.20 | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/master/ansible-core/alpine320/Dockerfile) | | | | | `2.17-alpine-3.20` |
| Bullseye (Debian 11) | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/master/ansible-core/debian-bullseye/Dockerfile) | | `2.14-bullseye` | `2.15-bullseye` | | `2.17-bullseye` |
| Bullseye Slim (Debian 11) | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/master/ansible-core/debian-bullseye-slim/Dockerfile) | | `2.14-bullseye-slim` | `2.15-bullseye-slim` | | `2.17-bullseye-slim` |
| Bookworm (Debian 12) | [Dockerfile](https://github.com/willhallonline/docker-ansible/blob/master/ansible-core/debian-bookworm/Dockerfile) | | `2.14-bookworm` | `2.15-bookworm` | `2.16-bookworm` | `2.17-bookworm` |
Expand Down
59 changes: 59 additions & 0 deletions ansible-core/alpine320/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# pull base image
FROM alpine:3.20

ARG ANSIBLE_CORE_VERSION
ARG ANSIBLE_VERSION
ARG ANSIBLE_LINT
ENV ANSIBLE_CORE_VERSION ${ANSIBLE_CORE_VERSION}
ENV ANSIBLE_VERSION ${ANSIBLE_VERSION}
ENV ANSIBLE_LINT ${ANSIBLE_LINT}

# Labels.
LABEL maintainer="[email protected]" \
org.label-schema.schema-version="1.0" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.name="willhallonline/ansible" \
org.label-schema.description="Ansible inside Docker" \
org.label-schema.url="https://github.com/willhallonline/docker-ansible" \
org.label-schema.vcs-url="https://github.com/willhallonline/docker-ansible" \
org.label-schema.vendor="Will Hall Online" \
org.label-schema.docker.cmd="docker run --rm -it -v $(pwd):/ansible ~/.ssh/id_rsa:/root/id_rsa willhallonline/ansible"

RUN apk --no-cache add \
sudo \
python3 \
py3-pip \
openssl \
ca-certificates \
sshpass \
openssh-client \
rsync \
git && \
apk --no-cache add --virtual build-dependencies \
python3-dev \
libffi-dev \
musl-dev \
gcc \
cargo \
build-base && \
rm -rf /usr/lib/python3.12/EXTERNALLY-MANAGED && \
pip3 install --upgrade pip wheel && \
pip3 install --upgrade cryptography cffi && \
pip3 install ansible-core==${ANSIBLE_CORE_VERSION} && \
pip3 install ansible==${ANSIBLE_VERSION} && \
pip3 install --ignore-installed ansible-lint==${ANSIBLE_LINT} && \
pip3 install mitogen jmespath && \
pip3 install --upgrade pywinrm && \
apk del build-dependencies && \
rm -rf /var/cache/apk/* && \
rm -rf /root/.cache/pip && \
rm -rf /root/.cargo

RUN mkdir /ansible && \
mkdir -p /etc/ansible && \
echo 'localhost' > /etc/ansible/hosts

WORKDIR /ansible

CMD [ "ansible-playbook", "--version" ]

0 comments on commit 682b391

Please sign in to comment.