-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
103 additions
and
0 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,44 @@ | ||
--- | ||
name: Build AdGuard Home image | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- adguard-home/** | ||
- .github/workflows/build-adguard-home.yml | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
strategy: | ||
matrix: | ||
version: ['0.107.48'] | ||
steps: | ||
- name: Check-out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push image to registry | ||
uses: docker/build-push-action@v5 | ||
with: | ||
platforms: linux/amd64 | ||
context: ./adguard-home | ||
file: ./adguard-home/Dockerfile | ||
push: true | ||
build-args: | | ||
VERSION=${{ matrix.version }} | ||
tags: | | ||
ghcr.io/f-bn/adguard-home:${{ matrix.version }} |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# --- Build stage --- | ||
FROM cgr.dev/chainguard/wolfi-base:latest AS build | ||
|
||
ARG TARGETOS | ||
ARG TARGETARCH | ||
ARG VERSION=0.107.48 | ||
|
||
RUN apk add --no-cache libcap-utils | ||
|
||
WORKDIR /build | ||
|
||
ADD https://github.com/AdguardTeam/AdGuardHome/releases/download/v${VERSION}/AdGuardHome_${TARGETOS}_${TARGETARCH}.tar.gz /build/ | ||
|
||
RUN set -ex ; \ | ||
tar -xzf /build/AdGuardHome_${TARGETOS}_${TARGETARCH}.tar.gz --strip-components=2 ; \ | ||
setcap 'cap_net_bind_service=+ep' /build/AdGuardHome | ||
|
||
# --- Final stage --- | ||
FROM cgr.dev/chainguard/wolfi-base:latest | ||
|
||
COPY --from=build --chmod=755 /build/AdGuardHome /usr/bin/adguard-home | ||
|
||
RUN set -ex ; \ | ||
mkdir -p /etc/adguard-home /var/lib/adguard-home ; \ | ||
chown nonroot:nonroot /var/lib/adguard-home /etc/adguard-home | ||
|
||
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 | ||
|
||
USER nonroot | ||
|
||
VOLUME [ "/var/lib/adguard-home" ] | ||
|
||
ENTRYPOINT [ "/usr/bin/adguard-home" ] | ||
|
||
CMD [ "-c", "/etc/adguard-home/config.yaml", \ | ||
"-w", "/var/lib/adguard-home" ] | ||
|
||
LABEL \ | ||
org.opencontainers.image.title="adguard-home" \ | ||
org.opencontainers.image.source="https://github.com/f-bn/containers-images/adguard-home" \ | ||
org.opencontainers.image.description="Network-wide ads & trackers blocking DNS server" \ | ||
org.opencontainers.image.licenses="GPL-3.0-or-later" \ | ||
org.opencontainers.image.authors="Florian Bobin <[email protected]>" |
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,14 @@ | ||
## General informations | ||
|
||
Custom AdGuard Home image from official binary. | ||
|
||
## AdGuard Home configuration | ||
|
||
This image doesn't come with a default AdGuard Home configuration. You can bring your own configuration to the container (e.g using Docker): | ||
|
||
```shell | ||
# Since AdGuard is generating configuration during startup, configuration volume must be mounted R/W | ||
$ docker run [options] -v /path/to/configdir:/etc/adguard-home:rw ghcr.io/f-bn/adguard-home:0.107.48 | ||
``` | ||
|
||
More informations about AdGuard Home configuration [here](https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration). |