diff --git a/.github/workflows/dockerbuild.yml b/.github/workflows/dockerbuild.yml new file mode 100644 index 0000000..a36cb49 --- /dev/null +++ b/.github/workflows/dockerbuild.yml @@ -0,0 +1,39 @@ +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + + - + name: Log into registry + uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + platforms: linux/arm/v7 + push: true + tags: ghcr.io/sstent/unifitest:latest + cache-from: type=gha + cache-to: type=gha,mode=max + \ No newline at end of file diff --git a/Dockerfile.unifi5 b/Dockerfile similarity index 65% rename from Dockerfile.unifi5 rename to Dockerfile index db0eb23..0194af2 100644 --- a/Dockerfile.unifi5 +++ b/Dockerfile @@ -8,15 +8,17 @@ RUN mkdir -p /usr/lib/unifi/data /backups /logs RUN apt-get -q update && apt-get -y upgrade && \ apt-get install -y -q lsof anacron vim net-tools less gnupg2 apt-transport-https ca-certificates # add unifi repo +keys -RUN if [ -z "$REPO" ]; then REPO="stable"; fi && \ - echo "deb http://www.ubnt.com/downloads/unifi/debian $REPO ubiquiti" >/etc/apt/sources.list.d/ubnt.list && \ - apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50 && \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 && \ - echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" >/etc/apt/sources.list.d/mongodb-org-3.4.list +# RUN if [ -z "$REPO" ]; then REPO="stable"; fi && \ +# echo "deb http://www.ubnt.com/downloads/unifi/debian $REPO ubiquiti" >/etc/apt/sources.list.d/ubnt.list && \ +# apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50 && \ +# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 && \ +# echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" >/etc/apt/sources.list.d/mongodb-org-3.4.list # update then install +COPY ["unifi_sysvinit_all.deb"] RUN apt-get update -q -y && \ - apt-get install -q -y unifi + apt install -y ./unifi_sysvinit_all.deb + # apt-get install -q -y unifi #add scripts COPY ["unifi.sh","backup_unifi.sh","restore_unifi.sh", "/usr/lib/unifi/"] diff --git a/unifi_sysvinit_all.deb b/unifi_sysvinit_all.deb new file mode 100644 index 0000000..2d9badb Binary files /dev/null and b/unifi_sysvinit_all.deb differ