From da120ee0be00ee33b05281c8c74d604574ded191 Mon Sep 17 00:00:00 2001 From: Astound Date: Mon, 20 Jan 2025 07:17:10 +0800 Subject: update trivy action --- .gitea/workflows/release.yaml | 9 ++++----- Dockerfile | 6 ++++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index ac67bf4..ec7f4dd 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -88,14 +88,13 @@ jobs: ${{ secrets.DOCKER_REGISTRY_USER}}/hypermirror:v${{ steps.meta.outputs.IMAGE_VERSION }} - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@master + uses: astounds/trivy-action@v1 with: - image-ref: ${{ secrets.DOCKER_REGISTRY_USER}}/hypermirror:latest + image: ${{ secrets.DOCKER_REGISTRY_USER}}/hypermirror:latest + severity: 'CRITICAL,HIGH' + pkg-types: 'os' format: 'table' exit-code: '1' - ignore-unfixed: true - vuln-type: 'os' - severity: 'CRITICAL,HIGH' - name: Push Docker image uses: docker/build-push-action@v6 diff --git a/Dockerfile b/Dockerfile index 87e8ba2..587b555 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,12 +4,14 @@ RUN pacman -Syu --noconfirm && pacman -S --noconfirm \ nginx rsync cronie util-linux findutils && \ pacman -Scc --noconfirm -RUN mkdir /srv/repo +# Create the /srv/repo directory to store repository data +RUN mkdir -p /srv/repo COPY entrypoint.bash / RUN chmod u+x /entrypoint.bash - +# Define a mount point for the repository data VOLUME /srv/repo +# Expose port 80 for the web server EXPOSE 80 ENTRYPOINT ["/entrypoint.bash"] -- cgit v1.2.3