Skip to content

Commit

Permalink
Add variants
Browse files Browse the repository at this point in the history
  • Loading branch information
leojonathanoh committed Oct 12, 2023
1 parent cbc2061 commit b573817
Show file tree
Hide file tree
Showing 30 changed files with 1,932 additions and 10 deletions.
1,590 changes: 1,587 additions & 3 deletions .github/workflows/ci-master-pr.yml

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ Dockerized [dnsmasq](https://dnsmasq.org/).

| Tag | Dockerfile Build Context |
|:-------:|:---------:|
| `:1.11.1`, `:latest` | [View](variants/1.11.1) |
| `:1.10.1` | [View](variants/1.10.1) |
| `:1.9.4` | [View](variants/1.9.4) |
| `:1.8.7` | [View](variants/1.8.7) |
| `:1.7.1` | [View](variants/1.7.1) |
| `:1.6.9` | [View](variants/1.6.9) |
| `:1.5.2` | [View](variants/1.5.2) |
| `:1.4.0` | [View](variants/1.4.0) |
| `:1.3.1` | [View](variants/1.3.1) |
| `:1.2.6` | [View](variants/1.2.6) |
| `:1.1.4` | [View](variants/1.1.4) |
| `:1.0.6` | [View](variants/1.0.6) |
| `:0.9.10` | [View](variants/0.9.10) |

## Development

Expand Down
16 changes: 15 additions & 1 deletion generate/definitions/versions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
{
"coredns": {
"versions": [],
"versions": [
"1.11.1",
"1.10.1",
"1.9.4",
"1.8.7",
"1.7.1",
"1.6.9",
"1.5.2",
"1.4.0",
"1.3.1",
"1.2.6",
"1.1.4",
"1.0.6",
"0.9.10"
],
"versionsChangeScope": "minor",
"versionsNewScript": "Invoke-WebRequest https://api.github.com/repos/coredns/coredns/git/refs/tags | ConvertFrom-Json | % { $_.ref -replace 'refs/tags/v', '' } | ? { $_ -match '^\\d+\\.\\d+\\.\\d+$' } | Sort-Object { [version]$_ } -Descending"
}
Expand Down
11 changes: 5 additions & 6 deletions generate/templates/Dockerfile.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@"
FROM $( $VARIANT['_metadata']['distro'] ):$( $VARIANT['_metadata']['distro_version'] )
FROM coredns/coredns:$( $VARIANT['_metadata']['package_version'] ) AS base
FROM alpine:3.15
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on `$BUILDPLATFORM, building for `$TARGETPLATFORM"
# Install dnsmasq
COPY --from=base /coredns /coredns
RUN set -eux; \
apk add --no-cache $( $VARIANT['_metadata']['package'] )~=$( $VARIANT['_metadata']['package_version'] ); \
dnsmasq --version
/coredns --version | grep '$( $VARIANT['_metadata']['package_version'] )' -A100 -B100
RUN apk add --no-cache ca-certificates
Expand All @@ -17,8 +17,7 @@ RUN apk add --no-cache ca-certificates
@"
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE 53/tcp 53/udp
ENTRYPOINT [ "/docker-entrypoint.sh" ]
CMD [ "--no-daemon" ]
"@
16 changes: 16 additions & 0 deletions variants/0.9.10/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM coredns/coredns:0.9.10 AS base
FROM alpine:3.15
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

COPY --from=base /coredns /coredns
RUN set -eux; \
/coredns --version | grep '0.9.10' -A100 -B100

RUN apk add --no-cache ca-certificates

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE 53/tcp 53/udp
ENTRYPOINT [ "/docker-entrypoint.sh" ]
8 changes: 8 additions & 0 deletions variants/0.9.10/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 -- coredns "$@"
fi

exec "$@"
16 changes: 16 additions & 0 deletions variants/1.0.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM coredns/coredns:1.0.6 AS base
FROM alpine:3.15
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

COPY --from=base /coredns /coredns
RUN set -eux; \
/coredns --version | grep '1.0.6' -A100 -B100

RUN apk add --no-cache ca-certificates

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE 53/tcp 53/udp
ENTRYPOINT [ "/docker-entrypoint.sh" ]
8 changes: 8 additions & 0 deletions variants/1.0.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 -- coredns "$@"
fi

exec "$@"
16 changes: 16 additions & 0 deletions variants/1.1.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM coredns/coredns:1.1.4 AS base
FROM alpine:3.15
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

COPY --from=base /coredns /coredns
RUN set -eux; \
/coredns --version | grep '1.1.4' -A100 -B100

RUN apk add --no-cache ca-certificates

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE 53/tcp 53/udp
ENTRYPOINT [ "/docker-entrypoint.sh" ]
8 changes: 8 additions & 0 deletions variants/1.1.4/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 -- coredns "$@"
fi

exec "$@"
16 changes: 16 additions & 0 deletions variants/1.10.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM coredns/coredns:1.10.1 AS base
FROM alpine:3.15
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

COPY --from=base /coredns /coredns
RUN set -eux; \
/coredns --version | grep '1.10.1' -A100 -B100

RUN apk add --no-cache ca-certificates

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE 53/tcp 53/udp
ENTRYPOINT [ "/docker-entrypoint.sh" ]
8 changes: 8 additions & 0 deletions variants/1.10.1/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 -- coredns "$@"
fi

exec "$@"
16 changes: 16 additions & 0 deletions variants/1.11.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM coredns/coredns:1.11.1 AS base
FROM alpine:3.15
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

COPY --from=base /coredns /coredns
RUN set -eux; \
/coredns --version | grep '1.11.1' -A100 -B100

RUN apk add --no-cache ca-certificates

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE 53/tcp 53/udp
ENTRYPOINT [ "/docker-entrypoint.sh" ]
8 changes: 8 additions & 0 deletions variants/1.11.1/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 -- coredns "$@"
fi

exec "$@"
16 changes: 16 additions & 0 deletions variants/1.2.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM coredns/coredns:1.2.6 AS base
FROM alpine:3.15
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

COPY --from=base /coredns /coredns
RUN set -eux; \
/coredns --version | grep '1.2.6' -A100 -B100

RUN apk add --no-cache ca-certificates

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE 53/tcp 53/udp
ENTRYPOINT [ "/docker-entrypoint.sh" ]
8 changes: 8 additions & 0 deletions variants/1.2.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 -- coredns "$@"
fi

exec "$@"
16 changes: 16 additions & 0 deletions variants/1.3.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM coredns/coredns:1.3.1 AS base
FROM alpine:3.15
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

COPY --from=base /coredns /coredns
RUN set -eux; \
/coredns --version | grep '1.3.1' -A100 -B100

RUN apk add --no-cache ca-certificates

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE 53/tcp 53/udp
ENTRYPOINT [ "/docker-entrypoint.sh" ]
8 changes: 8 additions & 0 deletions variants/1.3.1/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 -- coredns "$@"
fi

exec "$@"
16 changes: 16 additions & 0 deletions variants/1.4.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM coredns/coredns:1.4.0 AS base
FROM alpine:3.15
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

COPY --from=base /coredns /coredns
RUN set -eux; \
/coredns --version | grep '1.4.0' -A100 -B100

RUN apk add --no-cache ca-certificates

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE 53/tcp 53/udp
ENTRYPOINT [ "/docker-entrypoint.sh" ]
8 changes: 8 additions & 0 deletions variants/1.4.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 -- coredns "$@"
fi

exec "$@"
16 changes: 16 additions & 0 deletions variants/1.5.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM coredns/coredns:1.5.2 AS base
FROM alpine:3.15
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

COPY --from=base /coredns /coredns
RUN set -eux; \
/coredns --version | grep '1.5.2' -A100 -B100

RUN apk add --no-cache ca-certificates

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE 53/tcp 53/udp
ENTRYPOINT [ "/docker-entrypoint.sh" ]
8 changes: 8 additions & 0 deletions variants/1.5.2/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 -- coredns "$@"
fi

exec "$@"
16 changes: 16 additions & 0 deletions variants/1.6.9/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM coredns/coredns:1.6.9 AS base
FROM alpine:3.15
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

COPY --from=base /coredns /coredns
RUN set -eux; \
/coredns --version | grep '1.6.9' -A100 -B100

RUN apk add --no-cache ca-certificates

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE 53/tcp 53/udp
ENTRYPOINT [ "/docker-entrypoint.sh" ]
8 changes: 8 additions & 0 deletions variants/1.6.9/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 -- coredns "$@"
fi

exec "$@"
16 changes: 16 additions & 0 deletions variants/1.7.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM coredns/coredns:1.7.1 AS base
FROM alpine:3.15
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

COPY --from=base /coredns /coredns
RUN set -eux; \
/coredns --version | grep '1.7.1' -A100 -B100

RUN apk add --no-cache ca-certificates

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE 53/tcp 53/udp
ENTRYPOINT [ "/docker-entrypoint.sh" ]
8 changes: 8 additions & 0 deletions variants/1.7.1/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 -- coredns "$@"
fi

exec "$@"
16 changes: 16 additions & 0 deletions variants/1.8.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM coredns/coredns:1.8.7 AS base
FROM alpine:3.15
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

COPY --from=base /coredns /coredns
RUN set -eux; \
/coredns --version | grep '1.8.7' -A100 -B100

RUN apk add --no-cache ca-certificates

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE 53/tcp 53/udp
ENTRYPOINT [ "/docker-entrypoint.sh" ]
8 changes: 8 additions & 0 deletions variants/1.8.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 -- coredns "$@"
fi

exec "$@"
Loading

0 comments on commit b573817

Please sign in to comment.