Skip to content

Commit

Permalink
Enhancement: Add ubuntu variants
Browse files Browse the repository at this point in the history
  • Loading branch information
leojonathanoh committed Apr 22, 2024
1 parent f37f527 commit cf3ef70
Show file tree
Hide file tree
Showing 9 changed files with 885 additions and 7 deletions.
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/*;

0 comments on commit cf3ef70

Please sign in to comment.