diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..53a688f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: ci + +on: + pull_request: + push: + branches: + - main + - master + +env: + TEST_TAG: yorickp/maldet:test + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build docker + uses: docker/build-push-action@v3 + with: + context: . + load: true + tags: ${{ env.TEST_TAG }} + - name: Test + run: docker run --rm ${{ env.TEST_TAG }} maldet + +# before_install: +# - docker run --rm -i lukasmartinelli/hadolint hadolint --ignore DL4000 --ignore DL3008 - < Dockerfile + + diff --git a/Dockerfile b/Dockerfile index 489d784..1902bb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,18 @@ -FROM alpine:3.6 +FROM alpine:3 LABEL maintainer="Yorick Poels" -ENV VERSION=1.6.2 - RUN apk add --no-cache wget tar bash perl &&\ rm -rf /var/cache/apk/* WORKDIR /tmp -RUN wget https://github.com/rfxn/linux-malware-detect/archive/"$VERSION".tar.gz --no-check-certificate &&\ - tar -xvf "$VERSION".tar.gz +RUN wget https://www.rfxn.com/downloads/maldetect-current.tar.gz --no-check-certificate &&\ + tar -xvf maldetect-current.tar.gz -WORKDIR /tmp/linux-malware-detect-"$VERSION" -RUN bash -x install.sh +RUN bash -x ./maldetect-*/install.sh COPY ./files/internals/internals.conf /usr/local/maldetect/internals/internals.conf -RUN /usr/local/maldetect/maldet -u +#RUN /usr/local/maldetect/maldet -u ENTRYPOINT ["/usr/local/maldetect/maldet"] diff --git a/README.md b/README.md index 6d7ee05..b3a0ef7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Docker maldetect [![Docker Automated build](https://img.shields.io/docker/automated/yorickps/maldetect.svg)](https://hub.docker.com/r/yorickps/maldetect/builds/) -[![Build Status](https://travis-ci.org/yorickps/docker-maldetect.svg?branch=master)](https://travis-ci.org/yorickps/docker-maldetect) +[![Actions Status](https://github.com/yorickps/workflows/ci/badge.svg)](https://github.com/yorickps/docker-maldetect/actions) Docker image to run [maldetect](https://www.rfxn.com/projects/linux-malware-detect/)