Skip to content

Commit

Permalink
Merge pull request #31 from darkwizard242/feature/add-ubuntu-24.04
Browse files Browse the repository at this point in the history
Include Ubuntu 24.04 and update to runner 22.04 image
  • Loading branch information
darkwizard242 authored Mar 18, 2024
2 parents 8d3c9b5 + 587530d commit f53aa4d
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,30 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
max-parallel: 10
matrix:
TAG_NAME: [ubuntu-22.04, ubuntu-20.04, ubuntu-18.04, rockylinux-8, centos-7, debian-bullseye, debian-buster]
TAG_NAME: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, ubuntu-18.04, rockylinux-8, centos-7, debian-bullseye, debian-buster]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# - name: Install Grype for Vulnerability Scanning of Docker images.
# run: |
# curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sudo sh -s -- -b /usr/local/bin

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: DockerHub auth
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.USER }}
password: ${{ secrets.PASS }}

- name: Build docker image tag ${{ matrix.TAG_NAME }} & push to dockerhub
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
file: ${{matrix.TAG_NAME}}/Dockerfile
pull: true
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
max-parallel: 10
matrix:
TAG_NAME: [ubuntu-22.04, ubuntu-20.04, ubuntu-18.04, rockylinux-8, centos-7, debian-bullseye, debian-buster]
TAG_NAME: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, ubuntu-18.04, rockylinux-8, centos-7, debian-bullseye, debian-buster]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# - name: Install Grype for Vulnerability Scanning of Docker images.
# run: |
# curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sudo sh -s -- -b /usr/local/bin

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Build docker image tag ${{ matrix.TAG_NAME }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
file: ${{matrix.TAG_NAME}}/Dockerfile
pull: true
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Docker images that contains ansible and/or any pre-requistes installed within th

## Supported tags and Dockerfile:

For Ubuntu 24.04 (noble), docker tag and Dockerfile:

- [ubuntu-24.04](https://github.com/darkwizard242/docker-ansible/blob/master/ubuntu-24.04/Dockerfile)

For Ubuntu 22.04 (jammy), docker tag and Dockerfile:

- [ubuntu-22.04](https://github.com/darkwizard242/docker-ansible/blob/master/ubuntu-22.04/Dockerfile)
Expand Down Expand Up @@ -54,6 +58,12 @@ For Debian 8 (jessie), docker tag and Dockerfile:

Simply, pull the docker image using whichever tag you prefer or run it directly.

### Ubuntu 24.04:

```shell
docker run -it darkwizard242/ansible:ubuntu-22.04 /bin/bash
```

### Ubuntu 22.04:

```shell
Expand Down
21 changes: 21 additions & 0 deletions ubuntu-24.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ubuntu:noble as base
LABEL maintainer="Ali Muhammad"

ENV DEPENDENCIES "software-properties-common python3 python3-pip python3-pip-whl python3-setuptools python3-software-properties sudo apt-transport-https iputils-ping wget curl gnupg gcc python3-dev xz-utils"

ENV PIP_PKGS "ansible"

# Install required dependencies
RUN DEBIAN_FRONTEND=non-interactive apt-get update -y \
&& DEBIAN_FRONTEND=non-interactive apt-get --no-install-recommends -y upgrade \
&& DEBIAN_FRONTEND=non-interactive apt-get install --no-install-recommends -y ${DEPENDENCIES} \
&& python3 -m pip install --no-cache-dir --break-system-packages -U ${PIP_PKGS} \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb \
&& for FILE in $(find /var/log -maxdepth 2 -type f); do echo "" > ${FILE}; done \
&& apt-get autoremove \
&& apt-get clean

FROM base

# Initialize
CMD ["/bin/bash"]

0 comments on commit f53aa4d

Please sign in to comment.