From 0cfcebdd239b8370e5c8909ac74b2754e959855c Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Thu, 14 Oct 2021 12:43:07 +0100 Subject: [PATCH 1/2] Update alpine and webproc In this commit I've done the following. These changes have been tested and confirmed to work. - Updated Alpine to 3.14 and Webproc to 0.4.0 - The WEBPROC variable names have changed due to a renaming of the downloadable assets on GitHub - The Webproc flags have changed slightly due to an upstream syntax change --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 50e17a9..e626285 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,15 @@ -FROM alpine:3.11 as build +FROM alpine:3.14 as build LABEL maintainer="David Chidell (dchidell@cisco.com)" FROM build as webproc -ENV WEBPROC_VERSION 0.2.2 -ENV WEBPROC_URL https://github.com/jpillora/webproc/releases/download/$WEBPROC_VERSION/webproc_linux_amd64.gz +ENV WEBPROCVERSION 0.4.0 +ENV WEBPROCURL https://github.com/jpillora/webproc/releases/download/v$WEBPROCVERSION/webproc_"$WEBPROCVERSION"_linux_amd64.gz RUN apk add --no-cache curl -RUN curl -sL $WEBPROC_URL | gzip -d - > /usr/local/bin/webproc +RUN curl -sL $WEBPROCURL | gzip -d - > /usr/local/bin/webproc RUN chmod +x /usr/local/bin/webproc FROM build as dnsmasq RUN apk --no-cache add dnsmasq COPY --from=webproc /usr/local/bin/webproc /usr/local/bin/webproc -ENTRYPOINT ["webproc","--on-exit","restart","--config","/etc/dnsmasq.conf,/etc/hosts,/etc/resolv.conf","--","dnsmasq","-k","--log-facility=-"] +ENTRYPOINT ["webproc","-o","restart","-c","/etc/dnsmasq.conf","-c","/etc/hosts","-c","/etc/resolv.conf","--","dnsmasq","-k","--log-facility=-"] EXPOSE 53/udp 8080 From e738e49e6e3e6aff20fb7e5f37ee9a23adfd0730 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Thu, 14 Oct 2021 13:02:40 +0100 Subject: [PATCH 2/2] Create automated build workflow --- .github/workflows/build.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..130ca2e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,18 @@ +name: Build Docker Image +on: + push: + branches: master + +jobs: + build: + name: Push to GHCR + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Login + run: echo ${{ secrets.GHCR_PAT }} | docker login ghcr.io -u dchidell --password-stdin + - name: Build + run: docker build . --file Dockerfile --tag ghcr.io/dchidell/dnsmasq-web:latest + - name: Push + run: | + docker push ghcr.io/dchidell/dnsmasq-web:latest