diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml new file mode 100644 index 00000000..bf99eccb --- /dev/null +++ b/.github/workflows/build-docker.yml @@ -0,0 +1,25 @@ +name: Docker Build + +on: + push: + branches: + - 'main' + +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 Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v4 + with: + push: true + tags: utoni/ndpid:latest diff --git a/Dockerfile b/Dockerfile index 0c48d79e..7cff2d0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,10 @@ FROM ubuntu:22.10 as builder WORKDIR /root -RUN apt-get -y update && apt-get install -y git cmake pkg-config libpcap-dev autoconf libtool +RUN env DEBIAN_FRONTEND=noninteractive apt-get -y update && apt-get install -y wget unzip git make cmake pkg-config libpcap-dev autoconf libtool RUN git clone https://github.com/utoni/nDPId.git -#for dev, uncomment below -#RUN mkdir /root/nDPId -#COPY . /root/nDPId/ - -RUN cd nDPId && mkdir build && cd build && cmake .. -DBUILD_NDPI=ON && make - +RUN cd nDPId && mkdir -p build && cd build && cmake .. -DBUILD_NDPI=ON && make FROM ubuntu:22.10 WORKDIR /root @@ -17,9 +12,3 @@ RUN apt-get -y update && apt-get -y install libpcap-dev COPY --from=builder /root/nDPId/libnDPI/ /root/ COPY --from=builder /root/nDPId/build/nDPIsrvd /root/nDPId/build/nDPId /root/ - -#RUN echo "#!/bin/bash\n" \ -# "/root/nDPIsrvd -d\n"\ -# "/root/nDPId \n" > run.sh && cat run.sh && chmod +x run.sh - -#ENTRYPOINT ["/root/run.sh"] diff --git a/README.md b/README.md index 2d72b143..2acc52c8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![Build](https://github.com/utoni/nDPId/actions/workflows/build.yml/badge.svg)](https://github.com/utoni/nDPId/actions/workflows/build.yml) [![Gitlab-CI](https://gitlab.com/utoni/nDPId/badges/main/pipeline.svg)](https://gitlab.com/utoni/nDPId/-/pipelines) [![Circle-CI](https://circleci.com/gh/utoni/nDPId.svg?style=shield "Circle-CI")](https://app.circleci.com/pipelines/github/utoni/nDPId) +![Docker Automated build](https://img.shields.io/docker/automated/utoni/ndpid) # References diff --git a/examples/cxx-graph b/examples/cxx-graph index 3491eafc..68eb1b10 160000 --- a/examples/cxx-graph +++ b/examples/cxx-graph @@ -1 +1 @@ -Subproject commit 3491eafcd17d4a99653c5491c39260c6651635f4 +Subproject commit 68eb1b105d7fde5fa8139d04ba376887da9a7ac9 diff --git a/examples/js-rt-analyzer-frontend b/examples/js-rt-analyzer-frontend index 48860b23..6806ef7d 160000 --- a/examples/js-rt-analyzer-frontend +++ b/examples/js-rt-analyzer-frontend @@ -1 +1 @@ -Subproject commit 48860b23c97713f645231273ea1c8234350e7f96 +Subproject commit 6806ef7d13e95a3af2ef722b9c36ad122be1ec4f