From 08ef459de9c9bd0d4818486335f11690c362c61c Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 2 Aug 2022 18:30:57 +0200 Subject: [PATCH] CI + Dockerfile erstellt --- .drone.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ Dockerfile | 24 ++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..abd5e39 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,42 @@ +--- +kind: pipeline +type: docker +name: default +steps: + - name: run gitleaks + image: plugins/gitleaks + settings: + path: . + # https://github.com/hadolint/hadolint/blob/master/docs/INTEGRATION.md +# - name: hadolint +# image: hadolint/hadolint:latest-debian +# # image: ghcr.io/hadolint/hadolint:latest-debian +# commands: +# - hadolint --version +# - hadolint Dockerfile + - name: docker_build_and_push + image: plugins/docker + environment: + http_proxy: http://acng.grote.lan:9999 + settings: + # Dockerhub-Username + username: quotengrote + # Dockerhub-Password + # als Org-Secret hinterlegt + password: + from_secret: DOCKERHUB_PASS + # Container-Registry + # registry: hub.docker.com + # Name des Containerfiles + dockerfile: Dockerfile + # Repo auf dem Dockerhub + repo: quotengrote/munin-server + tags: + - latest + - ${DRONE_COMMIT_SHA:0:8} + when: + branch: + - master + event: + include: + - push diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ddc1126 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +############################################################ +# Dockerfile to build fpm-build images +# fpm can be used to build .rpm or .deb packages +# Based on Debian +# See: https://fpm.readthedocs.io +############################################################ +FROM debian:buster-slim + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update && \ + apt-get -y --no-install-recommends install \ + ruby \ + ruby-dev \ + rubygems \ + build-essential \ + git \ + wget \ + rpm \ + gawk \ + && apt-get clean && \ + gem install --no-ri --no-rdoc fpm && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*