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: Remove alpine-* suffix from docker tags #40

Merged
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
106 changes: 53 additions & 53 deletions .github/workflows/ci-master-pr.yml

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ Dockerized [`webhook`](https://github.com/adnanh/webhook) with useful tools.

| Tag | Dockerfile Build Context |
|:-------:|:---------:|
| `:2.8.1-alpine-3.17`, `:latest` | [View](variants/2.8.1-alpine-3.17) |
| `:2.8.1-libvirt-8-alpine-3.17` | [View](variants/2.8.1-libvirt-8-alpine-3.17) |
| `:2.8.1-curl-git-jq-sops-ssh-alpine-3.17` | [View](variants/2.8.1-curl-git-jq-sops-ssh-alpine-3.17) |
| `:2.8.1-libvirt-7-alpine-3.15` | [View](variants/2.8.1-libvirt-7-alpine-3.15) |
| `:2.8.1-libvirt-6-alpine-3.13` | [View](variants/2.8.1-libvirt-6-alpine-3.13) |
| `:2.7.0-alpine-3.17` | [View](variants/2.7.0-alpine-3.17) |
| `:2.7.0-libvirt-8-alpine-3.17` | [View](variants/2.7.0-libvirt-8-alpine-3.17) |
| `:2.7.0-curl-git-jq-sops-ssh-alpine-3.17` | [View](variants/2.7.0-curl-git-jq-sops-ssh-alpine-3.17) |
| `:2.7.0-libvirt-7-alpine-3.15` | [View](variants/2.7.0-libvirt-7-alpine-3.15) |
| `:2.7.0-libvirt-6-alpine-3.13` | [View](variants/2.7.0-libvirt-6-alpine-3.13) |
| `:2.8.1`, `:latest` | [View](variants/2.8.1) |
| `:2.8.1-libvirt-8` | [View](variants/2.8.1-libvirt-8) |
| `:2.8.1-curl-git-jq-sops-ssh` | [View](variants/2.8.1-curl-git-jq-sops-ssh) |
| `:2.8.1-libvirt-7` | [View](variants/2.8.1-libvirt-7) |
| `:2.8.1-libvirt-6` | [View](variants/2.8.1-libvirt-6) |
| `:2.7.0` | [View](variants/2.7.0) |
| `:2.7.0-libvirt-8` | [View](variants/2.7.0-libvirt-8) |
| `:2.7.0-curl-git-jq-sops-ssh` | [View](variants/2.7.0-curl-git-jq-sops-ssh) |
| `:2.7.0-libvirt-7` | [View](variants/2.7.0-libvirt-7) |
| `:2.7.0-libvirt-6` | [View](variants/2.7.0-libvirt-6) |

## Usage

Expand Down
6 changes: 3 additions & 3 deletions generate/definitions/VARIANTS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ $VARIANTS = @(
}
components = $subVariant['components']
}
# Docker image tag. E.g. '3.8-curl'
# Docker image tag. E.g. '2.8.1' or '2.8.1-libvirt-8'
tag = @(
$variant['package_version']
$subVariant['components'] | ? { $_ }
$variant['distro']
$variant['distro_version']
# $variant['distro']
# $variant['distro_version']
) -join '-'
tag_as_latest = if ($variant['package_version'] -eq $local:VARIANTS_MATRIX[0]['package_version'] -and $variant['distro_version'] -eq $local:VARIANTS_MATRIX[0]['distro_version'] -and $subVariant['components'].Count -eq 0) { $true } else { $false }
}
Expand Down
34 changes: 34 additions & 0 deletions variants/2.7.0-curl-git-jq-sops-ssh/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM golang:1.20-alpine as builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

RUN set -eux; \
apk add --no-cache git; \
git clone https://github.com/adnanh/webhook.git /src --branch 2.7.0; \
cd /src; \
go build -ldflags="-s -w" -o /usr/local/bin/webhook;

FROM alpine:3.17
COPY --from=builder /usr/local/bin/webhook /usr/local/bin/webhook
RUN webhook --version

RUN apk add --no-cache ca-certificates
RUN apk add --no-cache curl
RUN apk add --no-cache git
RUN apk add --no-cache jq
RUN set -eux; \
wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux > /usr/local/bin/sops; \
chmod +x /usr/local/bin/sops; \
sha256sum /usr/local/bin/sops | grep '^185348fd77fc160d5bdf3cd20ecbc796163504fd3df196d7cb29000773657b74 '; \
sops --version

RUN apk add --no-cache gnupg
RUN apk add --no-cache openssh-client
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh

WORKDIR /config
ENTRYPOINT [ "/docker-entrypoint.sh" ]
EXPOSE 9000
CMD [ "-verbose", "-hooks=/config/hooks.yml", "-hotreload" ]
8 changes: 8 additions & 0 deletions variants/2.7.0-curl-git-jq-sops-ssh/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -eu

if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
set -- webhook "$@"
fi

exec "$@"
24 changes: 24 additions & 0 deletions variants/2.7.0-libvirt-6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM golang:1.20-alpine as builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

RUN set -eux; \
apk add --no-cache git; \
git clone https://github.com/adnanh/webhook.git /src --branch 2.7.0; \
cd /src; \
go build -ldflags="-s -w" -o /usr/local/bin/webhook;

FROM alpine:3.13
COPY --from=builder /usr/local/bin/webhook /usr/local/bin/webhook
RUN webhook --version

RUN apk add --no-cache ca-certificates
RUN apk add --no-cache libvirt-client
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh

WORKDIR /config
ENTRYPOINT [ "/docker-entrypoint.sh" ]
EXPOSE 9000
CMD [ "-verbose", "-hooks=/config/hooks.yml", "-hotreload" ]
8 changes: 8 additions & 0 deletions variants/2.7.0-libvirt-6/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -eu

if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
set -- webhook "$@"
fi

exec "$@"
24 changes: 24 additions & 0 deletions variants/2.7.0-libvirt-7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM golang:1.20-alpine as builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

RUN set -eux; \
apk add --no-cache git; \
git clone https://github.com/adnanh/webhook.git /src --branch 2.7.0; \
cd /src; \
go build -ldflags="-s -w" -o /usr/local/bin/webhook;

FROM alpine:3.15
COPY --from=builder /usr/local/bin/webhook /usr/local/bin/webhook
RUN webhook --version

RUN apk add --no-cache ca-certificates
RUN apk add --no-cache libvirt-client
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh

WORKDIR /config
ENTRYPOINT [ "/docker-entrypoint.sh" ]
EXPOSE 9000
CMD [ "-verbose", "-hooks=/config/hooks.yml", "-hotreload" ]
8 changes: 8 additions & 0 deletions variants/2.7.0-libvirt-7/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -eu

if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
set -- webhook "$@"
fi

exec "$@"
24 changes: 24 additions & 0 deletions variants/2.7.0-libvirt-8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM golang:1.20-alpine as builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

RUN set -eux; \
apk add --no-cache git; \
git clone https://github.com/adnanh/webhook.git /src --branch 2.7.0; \
cd /src; \
go build -ldflags="-s -w" -o /usr/local/bin/webhook;

FROM alpine:3.17
COPY --from=builder /usr/local/bin/webhook /usr/local/bin/webhook
RUN webhook --version

RUN apk add --no-cache ca-certificates
RUN apk add --no-cache libvirt-client
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh

WORKDIR /config
ENTRYPOINT [ "/docker-entrypoint.sh" ]
EXPOSE 9000
CMD [ "-verbose", "-hooks=/config/hooks.yml", "-hotreload" ]
8 changes: 8 additions & 0 deletions variants/2.7.0-libvirt-8/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -eu

if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
set -- webhook "$@"
fi

exec "$@"
23 changes: 23 additions & 0 deletions variants/2.7.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM golang:1.20-alpine as builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

RUN set -eux; \
apk add --no-cache git; \
git clone https://github.com/adnanh/webhook.git /src --branch 2.7.0; \
cd /src; \
go build -ldflags="-s -w" -o /usr/local/bin/webhook;

FROM alpine:3.17
COPY --from=builder /usr/local/bin/webhook /usr/local/bin/webhook
RUN webhook --version

RUN apk add --no-cache ca-certificates
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh

WORKDIR /config
ENTRYPOINT [ "/docker-entrypoint.sh" ]
EXPOSE 9000
CMD [ "-verbose", "-hooks=/config/hooks.yml", "-hotreload" ]
8 changes: 8 additions & 0 deletions variants/2.7.0/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -eu

if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
set -- webhook "$@"
fi

exec "$@"
34 changes: 34 additions & 0 deletions variants/2.8.1-curl-git-jq-sops-ssh/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM golang:1.20-alpine as builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

RUN set -eux; \
apk add --no-cache git; \
git clone https://github.com/adnanh/webhook.git /src --branch 2.8.1; \
cd /src; \
go build -ldflags="-s -w" -o /usr/local/bin/webhook;

FROM alpine:3.17
COPY --from=builder /usr/local/bin/webhook /usr/local/bin/webhook
RUN webhook --version

RUN apk add --no-cache ca-certificates
RUN apk add --no-cache curl
RUN apk add --no-cache git
RUN apk add --no-cache jq
RUN set -eux; \
wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux > /usr/local/bin/sops; \
chmod +x /usr/local/bin/sops; \
sha256sum /usr/local/bin/sops | grep '^185348fd77fc160d5bdf3cd20ecbc796163504fd3df196d7cb29000773657b74 '; \
sops --version

RUN apk add --no-cache gnupg
RUN apk add --no-cache openssh-client
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh

WORKDIR /config
ENTRYPOINT [ "/docker-entrypoint.sh" ]
EXPOSE 9000
CMD [ "-verbose", "-hooks=/config/hooks.yml", "-hotreload" ]
8 changes: 8 additions & 0 deletions variants/2.8.1-curl-git-jq-sops-ssh/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -eu

if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
set -- webhook "$@"
fi

exec "$@"
24 changes: 24 additions & 0 deletions variants/2.8.1-libvirt-6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM golang:1.20-alpine as builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

RUN set -eux; \
apk add --no-cache git; \
git clone https://github.com/adnanh/webhook.git /src --branch 2.8.1; \
cd /src; \
go build -ldflags="-s -w" -o /usr/local/bin/webhook;

FROM alpine:3.13
COPY --from=builder /usr/local/bin/webhook /usr/local/bin/webhook
RUN webhook --version

RUN apk add --no-cache ca-certificates
RUN apk add --no-cache libvirt-client
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh

WORKDIR /config
ENTRYPOINT [ "/docker-entrypoint.sh" ]
EXPOSE 9000
CMD [ "-verbose", "-hooks=/config/hooks.yml", "-hotreload" ]
8 changes: 8 additions & 0 deletions variants/2.8.1-libvirt-6/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -eu

if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
set -- webhook "$@"
fi

exec "$@"
24 changes: 24 additions & 0 deletions variants/2.8.1-libvirt-7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM golang:1.20-alpine as builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

RUN set -eux; \
apk add --no-cache git; \
git clone https://github.com/adnanh/webhook.git /src --branch 2.8.1; \
cd /src; \
go build -ldflags="-s -w" -o /usr/local/bin/webhook;

FROM alpine:3.15
COPY --from=builder /usr/local/bin/webhook /usr/local/bin/webhook
RUN webhook --version

RUN apk add --no-cache ca-certificates
RUN apk add --no-cache libvirt-client
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh

WORKDIR /config
ENTRYPOINT [ "/docker-entrypoint.sh" ]
EXPOSE 9000
CMD [ "-verbose", "-hooks=/config/hooks.yml", "-hotreload" ]
8 changes: 8 additions & 0 deletions variants/2.8.1-libvirt-7/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -eu

if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
set -- webhook "$@"
fi

exec "$@"
24 changes: 24 additions & 0 deletions variants/2.8.1-libvirt-8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM golang:1.20-alpine as builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

RUN set -eux; \
apk add --no-cache git; \
git clone https://github.com/adnanh/webhook.git /src --branch 2.8.1; \
cd /src; \
go build -ldflags="-s -w" -o /usr/local/bin/webhook;

FROM alpine:3.17
COPY --from=builder /usr/local/bin/webhook /usr/local/bin/webhook
RUN webhook --version

RUN apk add --no-cache ca-certificates
RUN apk add --no-cache libvirt-client
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh

WORKDIR /config
ENTRYPOINT [ "/docker-entrypoint.sh" ]
EXPOSE 9000
CMD [ "-verbose", "-hooks=/config/hooks.yml", "-hotreload" ]
8 changes: 8 additions & 0 deletions variants/2.8.1-libvirt-8/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -eu

if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
set -- webhook "$@"
fi

exec "$@"
Loading