-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/jauderho/dockerfiles
- Loading branch information
Showing
10 changed files
with
184 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: adguardhome | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- adguardhome/* | ||
- .github/workflows/adguardhome.yml | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 8 * * 1" | ||
|
||
env: | ||
BUILD_VERSION: "v0.107.52" | ||
DOCKER_CLI_EXPERIMENTAL: enabled | ||
REPOSITORY: ${{ github.actor }}/${{ github.workflow }} | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
packages: write | ||
|
||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v1 | ||
with: | ||
egress-policy: audti | ||
disable-telemetry: false | ||
allowed-endpoints: | ||
95s5acprodeus1file6.blob.core.windows.net:443 | ||
api.github.com:443 | ||
artifactcache.actions.githubusercontent.com:443 | ||
auth.docker.io:443 | ||
codeload.github.com:443 | ||
dl-cdn.alpinelinux.org:443 | ||
ghcr.io:443 | ||
github.com:443 | ||
pkg-containers.githubusercontent.com:443 | ||
production.cloudflare.docker.com:443 | ||
proxy.golang.org:443 | ||
registry-1.docker.io:443 | ||
sum.golang.org:443 | ||
|
||
- name: Source checkout | ||
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v2.4.0 | ||
|
||
- name: Setup QEMU | ||
id: qemu | ||
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v1.2.0 | ||
|
||
- name: Setup Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v1 | ||
|
||
- name: Set Docker metadata | ||
id: docker_meta | ||
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v3 | ||
with: | ||
images: ${{ env.REPOSITORY }} | ||
labels: | | ||
org.opencontainers.image.version=${{ env.BUILD_VERSION }} | ||
org.opencontainers.image.revision=${{ github.sha }} | ||
org.opencontainers.image.title=${{ env.REPOSITORY }} | ||
- name: GitHub login | ||
if: ${{ github.event_name != 'pull_request' }} | ||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v1.12.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: DockerHub login | ||
if: ${{ github.event_name != 'pull_request' }} | ||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v1.12.0 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@32945a339266b759abcbdc89316275140b0fc960 # v2.8.0 | ||
with: | ||
push: ${{ github.event_name != 'pull_request' }} | ||
context: ${{ github.workflow }} | ||
#platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/ppc64le,linux/s390x | ||
#platforms: linux/amd64,linux/arm64 | ||
#platforms: linux/amd64 | ||
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/arm/v7,linux/arm/v6,linux/s390x | ||
#platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/arm/v7,linux/arm/v6,linux/s390x | ||
build-args: | | ||
BUILD_VERSION | ||
sbom: true | ||
provenance: true | ||
cache-from: type=gha, scope=${{ github.workflow }} | ||
cache-to: type=gha, scope=${{ github.workflow }} | ||
labels: ${{ steps.docker_meta.outputs.labels }} | ||
tags: | | ||
docker.io/${{ env.REPOSITORY }}:${{ env.BUILD_VERSION }} | ||
docker.io/${{ env.REPOSITORY }}:latest | ||
ghcr.io/${{ env.REPOSITORY }}:${{ env.BUILD_VERSION }} | ||
ghcr.io/${{ env.REPOSITORY }}:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
FROM ghcr.io/jauderho/golang:1.23.1-alpine3.20@sha256:027a986ddfba3c8d80138db345dc9382ba1ccbb3bd27a0ae61714e2b9018f105 AS build | ||
|
||
WORKDIR /go/src/github.com/adguardteam/adguardhome/ | ||
|
||
ARG BUILD_VERSION | ||
ARG ARCHIVE_URL=https://github.com/adguardteam/adguardhome/archive/ | ||
ARG GIT_URL=https://github.com/adguardteam/adguardhome.git | ||
|
||
ENV CGO_ENABLED 0 | ||
|
||
RUN test -n "${BUILD_VERSION}" \ | ||
&& apk update \ | ||
&& apk upgrade -a \ | ||
&& apk add --no-cache ca-certificates curl git gcc musl-dev \ | ||
&& update-ca-certificates \ | ||
&& git clone --depth 1 ${GIT_URL} --branch ${BUILD_VERSION} /go/src/github.com/adguardteam/adguardhome \ | ||
&& cd /go/src/github.com/adguardteam/adguardhome \ | ||
&& go get -u golang.org/x/crypto golang.org/x/net \ | ||
&& go build -v -trimpath -ldflags="-s -w -X github.com/AdguardTeam/AdGuardHome/internal/version.version=${BUILD_VERSION}" . | ||
|
||
|
||
# ---------------------------------------------------------------------------- | ||
|
||
|
||
#FROM scratch | ||
FROM ghcr.io/jauderho/alpine:3.20.3@sha256:7d51dd030c8c83a805f71a1487c8bc5673771985842515dc468ef52ace748ffe | ||
|
||
LABEL org.opencontainers.image.authors="Jauder Ho <[email protected]>" | ||
LABEL org.opencontainers.image.url="https://github.com/jauderho/dockerfiles" | ||
LABEL org.opencontainers.image.documentation="https://github.com/jauderho/dockerfiles" | ||
LABEL org.opencontainers.image.source="https://github.com/jauderho/dockerfiles" | ||
LABEL org.opencontainers.image.title="jauderho/adguardhome" | ||
LABEL org.opencontainers.image.description="Network-wide ads & trackers blocking DNS server" | ||
|
||
RUN apk update \ | ||
&& apk upgrade -a \ | ||
&& apk --no-cache add ca-certificates libcap tzdata \ | ||
&& mkdir -p /opt/adguardhome/conf /opt/adguardhome/work \ | ||
&& chown -R nobody: /opt/adguardhome | ||
|
||
COPY --chown=nobody:nogroup --from=build /go/src/github.com/adguardteam/adguardhome/AdGuardHome /opt/adguardhome/AdGuardHome | ||
|
||
RUN setcap 'cap_net_bind_service=+eip' /opt/adguardhome/AdGuardHome | ||
|
||
# 53 : TCP, UDP : DNS | ||
# 67 : UDP : DHCP (server) | ||
# 68 : UDP : DHCP (client) | ||
# 80 : TCP : HTTP (main) | ||
# 443 : TCP, UDP : HTTPS, DNS-over-HTTPS (incl. HTTP/3), DNSCrypt (main) | ||
# 853 : TCP, UDP : DNS-over-TLS, DNS-over-QUIC | ||
# 3000 : TCP, UDP : HTTP(S) (alt, incl. HTTP/3) | ||
# 5443 : TCP, UDP : DNSCrypt (alt) | ||
# 6060 : TCP : HTTP (pprof) | ||
EXPOSE 53/tcp 53/udp 67/udp 68/udp 80/tcp 443/tcp 443/udp 853/tcp\ | ||
853/udp 3000/tcp 3000/udp 5443/tcp 5443/udp 6060/tcp | ||
|
||
WORKDIR /opt/adguardhome/work | ||
|
||
ENTRYPOINT ["/opt/adguardhome/AdGuardHome"] | ||
|
||
CMD [ \ | ||
"--no-check-update", \ | ||
"-c", "/opt/adguardhome/conf/AdGuardHome.yaml", \ | ||
"-w", "/opt/adguardhome/work" \ | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
[![Build Status](https://github.com/jauderho/dockerfiles/workflows/adguardhome/badge.svg)](https://github.com/jauderho/dockerfiles/actions) | ||
[![Version](https://img.shields.io/docker/v/jauderho/adguardhome/latest)](https://github.com/adguardteam/adguardhome/) | ||
[![Docker Pulls](https://img.shields.io/docker/pulls/jauderho/adguardhome)](https://hub.docker.com/r/jauderho/adguardhome/) | ||
[![Image Size](https://img.shields.io/docker/image-size/jauderho/adguardhome/latest)](https://hub.docker.com/r/jauderho/adguardhome/) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
adguardhome | ||
age | ||
ali | ||
amass | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
adguardteam/adguardhome | ||
FiloSottile/age | ||
nakabonne/ali | ||
ansible/ansible | ||
|