diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ebad7e2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +--- +version: 2 +updates: + - package-ecosystem: "docker" + directory: "." + schedule: + interval: "weekly" diff --git a/.github/workflows/build-docker.yaml b/.github/workflows/build-docker.yaml new file mode 100644 index 0000000..ea1d78d --- /dev/null +++ b/.github/workflows/build-docker.yaml @@ -0,0 +1,25 @@ +name: ci + +on: + push: + tags: + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v3 + with: + push: true + platforms: linux/amd64,linux/arm64 + tags: ${{ secrets.DOCKERHUB_USERNAME }}/docker-udpspeeder:${{ github.ref_name }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d373b24 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM debian:bullseye-20220711 AS builder + +RUN apt-get update && apt-get install -y build-essential git +COPY . /src +WORKDIR /src +RUN make -f makefile + +FROM gcr.io/distroless/base-debian11 +COPY --from=builder /src/speederv2 / +ENTRYPOINT ["/speederv2"]