From 5993dc49f354b1f3793272094d2fc0b034f9517c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20B=C3=BClow?= Date: Sun, 6 Aug 2023 13:51:16 +0200 Subject: [PATCH] added builder Dockerfile --- .woodpecker.yml | 28 ++++++++++++++++++++++++++++ builder/Dockerfile | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .woodpecker.yml create mode 100644 builder/Dockerfile diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..3ebc2af --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,28 @@ +# Build and publish Docker images for multible architectures. +# +# Pushing an image to codeberg as container registry, +# package owner will be the repo owner. +# +# this config also shows usage of yaml aliases and +# was taken from https://codeberg.org/6543/docker-images/src/commit/37e29c227717c1c07d2776cddcf14725bf952875/.woodpecker/hello.yml + +when: + branch: main + +steps: + publish: + image: woodpeckerci/plugin-docker-buildx + settings: + dockerfile: builder/Dockerfile + platforms: linux/arm64/v8,linux/amd64 + repo: git.jmbit.de/filegate/utility-containers + registry: git.jmbit.de + tags: + - builder-latest + - builder + username: jmb + password: + from_secret: forgejo_token + when: + event: push + diff --git a/builder/Dockerfile b/builder/Dockerfile new file mode 100644 index 0000000..0be5b0d --- /dev/null +++ b/builder/Dockerfile @@ -0,0 +1,34 @@ +FROM docker.io/library/golang +LABEL authors="Johannes Bülow " +# Get all the stuff for CGO and Podman bindings +RUN export DEBIAN_FRONTEND="noninteractive" \ + && apt-get update \ + && apt-get install --no-install-recommends -y software-properties-common \ + && apt-get update \ + && apt-get install --no-install-recommends -y \ + bash \ + binutils \ + ca-certificates \ + clang \ + curl \ + g++ \ + gcc \ + git \ + libc6-dev \ + libssl-dev \ + libdevmapper-dev \ + llvm \ + make \ + pkg-config \ + tzdata \ + uuid \ + libgpgme-dev \ + libbtrfs-dev \ + golang-github-containerd-btrfs-dev \ + && apt-get -y autoremove \ + && apt-get clean -y \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ + && ln -sf /usr/include/asm-generic /usr/include/asm +WORKDIR /usr/local/src +COPY ./ ./ +RUN go get . && go mod download && go build -o filegate \ No newline at end of file