From 33ccf93911995d1dabd69c3bb5583ae830665119 Mon Sep 17 00:00:00 2001 From: Steven Polley Date: Fri, 23 Jun 2023 20:42:29 -0600 Subject: [PATCH] hostile takeover --- .drone.yml | 13 ++++ .github/renovate.json | 21 ------- .github/trivy.yaml | 5 -- .github/workflows/main.yml | 119 ------------------------------------- Dockerfile | 13 ++-- README.md | 5 +- 6 files changed, 19 insertions(+), 157 deletions(-) create mode 100644 .drone.yml delete mode 100644 .github/renovate.json delete mode 100644 .github/trivy.yaml delete mode 100644 .github/workflows/main.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..0651ed0 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,13 @@ +kind: pipeline +name: default + +workspace: + base: /go + path: src/deadbeef.codes/steven/docker-webdav-nginx + +steps: + +- name: create build environment + image: plugins/docker + settings: + repo: registry.deadbeef.codes/docker-webdav-nginx \ No newline at end of file diff --git a/.github/renovate.json b/.github/renovate.json deleted file mode 100644 index 6db13c0..0000000 --- a/.github/renovate.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:base" - ], - "dependencyDashboard": true, - "dependencyDashboardTitle": "Renovate Dashboard", - "labels": ["renovatebot"], - "packageRules": [ - { - "managers": ["github-actions"], - "matchUpdateTypes": ["patch"], - "automerge": true, - "automergeType": "pr", - "platformAutomerge": true - } - ], - "docker-compose": { - "ignorePaths": ["docker-compose-dev.yml"] - } -} diff --git a/.github/trivy.yaml b/.github/trivy.yaml deleted file mode 100644 index 9e0f1f4..0000000 --- a/.github/trivy.yaml +++ /dev/null @@ -1,5 +0,0 @@ -format: table -severity: - - CRITICAL -vulnerability: - ignore-unfixed: true diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 3a87f89..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,119 +0,0 @@ -name: CI/CD - -on: - push: - tags: - - "[0-9]+.[0-9]+.[0-9]+" - schedule: - - cron: "0 5 * * 0" - workflow_dispatch: - -env: - USER: loganmarchione - REPO: docker-webdav-nginx - -jobs: - lint: - name: Lint - - runs-on: ubuntu-latest - - steps: - - name: Check out the codebase - uses: actions/checkout@v3 - - - name: Lint Dockerfile with Hadolint - uses: hadolint/hadolint-action@v3.1.0 - with: - failure-threshold: error - ignore: DL3008,DL3018 - - ci: - name: Build and test - - needs: lint - runs-on: ubuntu-latest - - steps: - - name: Check out the codebase - uses: actions/checkout@v3 - - - name: Set variables - run: | - VER=$(cat VERSION) - echo "VERSION=$VER" >> $GITHUB_ENV - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build Docker Image - uses: docker/build-push-action@v4 - with: - push: false - context: . - file: Dockerfile - load: true - tags: | - ${{ env.USER }}/${{ env.REPO }}:${{ env.VERSION }} - ${{ env.USER }}/${{ env.REPO }}:latest - - - name: Test image - run: | - docker images - docker run --name test-container --detach --env WEBDAV_USER=user --env WEBDAV_PASS=password1 --volume 'webdav:/var/www/webdav' ${USER}/${REPO}:${VERSION} - docker ps -a - - - name: Container scan with Dockle - uses: goodwithtech/dockle-action@0.1.0 - with: - image: '${{ env.USER }}/${{ env.REPO }}:${{ env.VERSION }}' - format: 'list' - exit-code: '1' - exit-level: 'warn' - ignore: 'CIS-DI-0001' - - - name: Container scan with Trivy - uses: aquasecurity/trivy-action@0.11.2 - with: - scan-type: 'image' - image-ref: '${{ env.USER }}/${{ env.REPO }}:${{ env.VERSION }}' - trivy-config: ./github/trivy.yaml - - cd: - name: Deploy - - needs: ci - runs-on: ubuntu-latest - - steps: - - name: Check out the codebase - uses: actions/checkout@v3 - - - name: Set variables - run: | - VER=$(cat VERSION) - echo "VERSION=$VER" >> $GITHUB_ENV - - - 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.DOCKER_HUB_USER }} - password: ${{ secrets.DOCKER_HUB_PASS }} - logout: true - - - name: Build Docker Image - uses: docker/build-push-action@v4 - with: - push: true - context: . - file: Dockerfile - platforms: linux/amd64,linux/arm64,linux/arm/v7 - tags: | - ${{ env.USER }}/${{ env.REPO }}:${{ env.VERSION }} - ${{ env.USER }}/${{ env.REPO }}:latest diff --git a/Dockerfile b/Dockerfile index 9234a44..35219f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,14 @@ FROM debian:12-slim -ARG BUILD_DATE - -LABEL \ - maintainer="Logan Marchione " \ - org.opencontainers.image.authors="Logan Marchione " \ - org.opencontainers.image.title="docker-webdav-nginx" \ - org.opencontainers.image.description="Runs a Nginx WebDav server in Docker" \ - org.opencontainers.image.created=$BUILD_DATE +# Originally +# LABEL maintainer="Logan Marchione " \ +LABEL maintainer="himself@stevenpolley.net" ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get -y install --no-install-recommends \ apache2-utils \ - netcat-openbsd \ + netcat-openbsd \ nginx-extras && \ rm -rf /var/lib/apt/lists/* && \ mkdir -p "/var/www/webdav/restricted" && \ diff --git a/README.md b/README.md index 7636290..ce47cfb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ -# docker-webdav-nginx +[![Build Status](https://drone.deadbeef.codes/api/badges/steven/docker-webdav-nginx/status.svg)](https://drone.deadbeef.codes/steven/docker-webdav-nginx) -[![CI/CD](https://github.com/loganmarchione/docker-webdav-nginx/actions/workflows/main.yml/badge.svg)](https://github.com/loganmarchione/docker-webdav-nginx/actions/workflows/main.yml) -[![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/loganmarchione/docker-webdav-nginx)](https://hub.docker.com/r/loganmarchione/docker-webdav-nginx) +# docker-webdav-nginx Runs a Nginx WebDav server in Docker - Source code: [GitHub](https://github.com/loganmarchione/docker-webdav-nginx)