Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Add ubuntu variants #1

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
687 changes: 687 additions & 0 deletions .github/workflows/ci-master-pr.yml

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# docker-ubuntu

[![github-actions](https://github.com/theohbrothers/docker-ubuntu/actions/workflows/ci-master-pr.yml/badge.svg?branch=master)](https://github.com/theohbrothers/docker-ubuntu/actions/workflows/ci-master-pr.yml)
[![github-release](https://img.shields.io/github/v/release/theohbrothers/docker-ubuntu?style=flat-square)](https://github.com/theohbrothers/docker-ubuntu/releases/)
[![docker-image-size](https://img.shields.io/docker/image-size/theohbrothers/docker-ubuntu/latest)](https://hub.docker.com/r/theohbrothers/docker-ubuntu)

Dockerized ubuntu with useful tools.

## Tags

| Tag | Dockerfile Build Context |
|:-------:|:---------:|
| `:24.04-ci`, `:latest` | [View](variants/24.04-ci) |
| `:22.04-ci` | [View](variants/22.04-ci) |
| `:20.04-ci` | [View](variants/20.04-ci) |
| `:18.04-ci` | [View](variants/18.04-ci) |
| `:16.04-ci` | [View](variants/16.04-ci) |

## Development

Requires Windows `powershell` or [`pwsh`](https://github.com/PowerShell/PowerShell).

```powershell
# Install Generate-DockerImageVariants module: https://github.com/theohbrothers/Generate-DockerImageVariants
Install-Module -Name Generate-DockerImageVariants -Repository PSGallery -Scope CurrentUser -Force -Verbose

# Edit ./generate templates

# Generate the variants
Generate-DockerImageVariants .
```
2 changes: 2 additions & 0 deletions generate/definitions/VARIANTS.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
$local:VARIANTS_DISTRO_VERSIONS = @(
'24.04'
'22.04'
'20.04'
'18.04'
'16.04'
)
# Docker image variants' definitions
$local:VARIANTS_MATRIX = @(
Expand Down
22 changes: 15 additions & 7 deletions generate/templates/Dockerfile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ FROM $( $VARIANT['_metadata']['distro'] ):$( $VARIANT['_metadata']['distro_versi
RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y \
ca-certificates \
# dnsutils iproute2 netcat net-tools \
# rsync \
wget;
ca-certificates \
# dnsutils iproute2 netcat net-tools \
# rsync \
wget; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;


"@
Expand All @@ -21,7 +23,9 @@ $VARIANT['_metadata']['components'] | % {
@"
RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y bats
apt-get install --no-install-recommends -y bats; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;


"@
Expand All @@ -31,7 +35,9 @@ RUN set -eux; \
@"
RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y curl
apt-get install --no-install-recommends -y curl; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;


"@
Expand All @@ -41,7 +47,9 @@ RUN set -eux; \
@"
RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y jq
apt-get install --no-install-recommends -y jq; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;


"@
Expand Down
30 changes: 30 additions & 0 deletions variants/16.04-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:16.04

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y \
ca-certificates \
# dnsutils iproute2 netcat net-tools \
# rsync \
wget; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y bats; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y curl; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y jq; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

30 changes: 30 additions & 0 deletions variants/18.04-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:18.04

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y \
ca-certificates \
# dnsutils iproute2 netcat net-tools \
# rsync \
wget; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y bats; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y curl; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y jq; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

30 changes: 30 additions & 0 deletions variants/20.04-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:20.04

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y \
ca-certificates \
# dnsutils iproute2 netcat net-tools \
# rsync \
wget; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y bats; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y curl; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y jq; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

30 changes: 30 additions & 0 deletions variants/22.04-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:22.04

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y \
ca-certificates \
# dnsutils iproute2 netcat net-tools \
# rsync \
wget; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y bats; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y curl; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y jq; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

30 changes: 30 additions & 0 deletions variants/24.04-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:24.04

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y \
ca-certificates \
# dnsutils iproute2 netcat net-tools \
# rsync \
wget; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y bats; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y curl; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

RUN set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y jq; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*;

Loading