Skip to content

Commit 811d7ba

Browse files
Merge pull request #44 from theohbrothers/enhancement/add-git-variants
Enhancement: Add `git` variants
2 parents cfcffe6 + d8658b2 commit 811d7ba

File tree

29 files changed

+2079
-133
lines changed

29 files changed

+2079
-133
lines changed

.github/workflows/ci-master-pr.yml

Lines changed: 1683 additions & 123 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,43 @@ Dockerized `powershell`, based on [mcr.microsoft.com/powershell](https://hub.doc
1111
| Tag | Dockerfile Build Context |
1212
|:-------:|:---------:|
1313
| `:7.3-alpine-3.17` | [View](variants/7.3-alpine-3.17) |
14+
| `:7.3-alpine-3.17-git` | [View](variants/7.3-alpine-3.17-git) |
1415
| `:7.3-alpine-3.17-git-sops` | [View](variants/7.3-alpine-3.17-git-sops) |
1516
| `:7.2-alpine-3.17` | [View](variants/7.2-alpine-3.17) |
17+
| `:7.2-alpine-3.17-git` | [View](variants/7.2-alpine-3.17-git) |
1618
| `:7.2-alpine-3.17-git-sops` | [View](variants/7.2-alpine-3.17-git-sops) |
1719
| `:7.1.5-alpine-3.13` | [View](variants/7.1.5-alpine-3.13) |
20+
| `:7.1.5-alpine-3.13-git` | [View](variants/7.1.5-alpine-3.13-git) |
1821
| `:7.1.5-alpine-3.13-git-sops` | [View](variants/7.1.5-alpine-3.13-git-sops) |
1922
| `:7.0.3-alpine-3.9` | [View](variants/7.0.3-alpine-3.9) |
23+
| `:7.0.3-alpine-3.9-git` | [View](variants/7.0.3-alpine-3.9-git) |
2024
| `:7.0.3-alpine-3.9-git-sops` | [View](variants/7.0.3-alpine-3.9-git-sops) |
2125
| `:6.2.4-alpine-3.8` | [View](variants/6.2.4-alpine-3.8) |
26+
| `:6.2.4-alpine-3.8-git` | [View](variants/6.2.4-alpine-3.8-git) |
2227
| `:6.2.4-alpine-3.8-git-sops` | [View](variants/6.2.4-alpine-3.8-git-sops) |
2328
| `:6.1.3-alpine-3.8` | [View](variants/6.1.3-alpine-3.8) |
29+
| `:6.1.3-alpine-3.8-git` | [View](variants/6.1.3-alpine-3.8-git) |
2430
| `:6.1.3-alpine-3.8-git-sops` | [View](variants/6.1.3-alpine-3.8-git-sops) |
2531
| `:7.3-ubuntu-22.04`, `:latest` | [View](variants/7.3-ubuntu-22.04) |
32+
| `:7.3-ubuntu-22.04-git` | [View](variants/7.3-ubuntu-22.04-git) |
2633
| `:7.3-ubuntu-22.04-git-sops` | [View](variants/7.3-ubuntu-22.04-git-sops) |
2734
| `:7.2-ubuntu-22.04` | [View](variants/7.2-ubuntu-22.04) |
35+
| `:7.2-ubuntu-22.04-git` | [View](variants/7.2-ubuntu-22.04-git) |
2836
| `:7.2-ubuntu-22.04-git-sops` | [View](variants/7.2-ubuntu-22.04-git-sops) |
2937
| `:7.1.5-ubuntu-20.04` | [View](variants/7.1.5-ubuntu-20.04) |
38+
| `:7.1.5-ubuntu-20.04-git` | [View](variants/7.1.5-ubuntu-20.04-git) |
3039
| `:7.1.5-ubuntu-20.04-git-sops` | [View](variants/7.1.5-ubuntu-20.04-git-sops) |
3140
| `:7.0.3-ubuntu-18.04` | [View](variants/7.0.3-ubuntu-18.04) |
41+
| `:7.0.3-ubuntu-18.04-git` | [View](variants/7.0.3-ubuntu-18.04-git) |
3242
| `:7.0.3-ubuntu-18.04-git-sops` | [View](variants/7.0.3-ubuntu-18.04-git-sops) |
3343
| `:6.2.4-ubuntu-18.04` | [View](variants/6.2.4-ubuntu-18.04) |
44+
| `:6.2.4-ubuntu-18.04-git` | [View](variants/6.2.4-ubuntu-18.04-git) |
3445
| `:6.2.4-ubuntu-18.04-git-sops` | [View](variants/6.2.4-ubuntu-18.04-git-sops) |
3546
| `:6.1.3-ubuntu-18.04` | [View](variants/6.1.3-ubuntu-18.04) |
47+
| `:6.1.3-ubuntu-18.04-git` | [View](variants/6.1.3-ubuntu-18.04-git) |
3648
| `:6.1.3-ubuntu-18.04-git-sops` | [View](variants/6.1.3-ubuntu-18.04-git-sops) |
3749
| `:6.0.4-ubuntu-16.04` | [View](variants/6.0.4-ubuntu-16.04) |
50+
| `:6.0.4-ubuntu-16.04-git` | [View](variants/6.0.4-ubuntu-16.04-git) |
3851
| `:6.0.4-ubuntu-16.04-git-sops` | [View](variants/6.0.4-ubuntu-16.04-git-sops) |
3952

4053
## Development

generate/definitions/VARIANTS.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ $local:VARIANTS_MATRIX = @(
3030
base_image_tag = $_
3131
subvariants = @(
3232
@{ components = @() }
33+
@{ components = @( 'git' ) }
3334
@{ components = @( 'git', 'sops' ) }
3435
)
3536
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM mcr.microsoft.com/powershell:6.0.4-ubuntu-16.04
2+
3+
# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
4+
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
5+
ENV POWERSHELL_TELEMETRY_OPTOUT=1
6+
ENV POWERSHELL_UPDATECHECK=Off
7+
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
8+
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
9+
ENV DOTNET_TELEMETRY_OPTOUT=1
10+
ENV COMPlus_EnableDiagnostics=0
11+
12+
# Install Pester
13+
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose'
14+
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose'
15+
16+
RUN set -eux; \
17+
apt-get update; \
18+
apt-get install -y git; \
19+
rm -rf /var/lib/apt/lists/*
20+
21+
COPY docker-entrypoint.sh /docker-entrypoint.sh
22+
RUN chmod +x docker-entrypoint.sh
23+
24+
ENTRYPOINT [ "/docker-entrypoint.sh" ]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
5+
set -- pwsh "$@"
6+
fi
7+
8+
exec "$@"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
FROM mcr.microsoft.com/powershell:6.1.3-alpine-3.8
22

3+
# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
4+
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
5+
ENV POWERSHELL_TELEMETRY_OPTOUT=1
6+
ENV POWERSHELL_UPDATECHECK=Off
7+
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
8+
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
9+
ENV DOTNET_TELEMETRY_OPTOUT=1
10+
ENV COMPlus_EnableDiagnostics=0
11+
12+
# Install Pester
13+
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose'
14+
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose'
15+
316
RUN apk add --no-cache git
417

18+
COPY docker-entrypoint.sh /docker-entrypoint.sh
19+
RUN chmod +x docker-entrypoint.sh
20+
21+
ENTRYPOINT [ "/docker-entrypoint.sh" ]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
5+
set -- pwsh "$@"
6+
fi
7+
8+
exec "$@"
Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
FROM mcr.microsoft.com/powershell:6.1.3-ubuntu-18.04
22

3-
RUN apt-get update \
4-
&& apt-get install -y git \
5-
&& rm -rf /var/lib/apt/lists/*
3+
# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
4+
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
5+
ENV POWERSHELL_TELEMETRY_OPTOUT=1
6+
ENV POWERSHELL_UPDATECHECK=Off
7+
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
8+
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
9+
ENV DOTNET_TELEMETRY_OPTOUT=1
10+
ENV COMPlus_EnableDiagnostics=0
611

12+
# Install Pester
13+
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose'
14+
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose'
15+
16+
RUN set -eux; \
17+
apt-get update; \
18+
apt-get install -y git; \
19+
rm -rf /var/lib/apt/lists/*
20+
21+
COPY docker-entrypoint.sh /docker-entrypoint.sh
22+
RUN chmod +x docker-entrypoint.sh
23+
24+
ENTRYPOINT [ "/docker-entrypoint.sh" ]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
5+
set -- pwsh "$@"
6+
fi
7+
8+
exec "$@"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
FROM mcr.microsoft.com/powershell:6.2.4-alpine-3.8
22

3+
# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
4+
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
5+
ENV POWERSHELL_TELEMETRY_OPTOUT=1
6+
ENV POWERSHELL_UPDATECHECK=Off
7+
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
8+
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
9+
ENV DOTNET_TELEMETRY_OPTOUT=1
10+
ENV COMPlus_EnableDiagnostics=0
11+
12+
# Install Pester
13+
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose'
14+
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose'
15+
316
RUN apk add --no-cache git
417

18+
COPY docker-entrypoint.sh /docker-entrypoint.sh
19+
RUN chmod +x docker-entrypoint.sh
20+
21+
ENTRYPOINT [ "/docker-entrypoint.sh" ]

0 commit comments

Comments
 (0)