From f3290ff6dfbd8851d82522fd8d36e5588c12f748 Mon Sep 17 00:00:00 2001 From: garionion Date: Mon, 20 Sep 2021 11:13:54 +0200 Subject: [PATCH] add docker and cicd --- .drone.yml | 22 ++++++++++++++++++++++ Dockerfile | 9 +++++++++ 2 files changed, 31 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..4d1cc72 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,22 @@ +kind: pipeline +type: docker +name: default + +steps: + - name: build + image: golang + commands: + - CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' . + + - name: publish + image: techknowlogick/drone-docker:latest + privileged: true + settings: + repo: garionion/gitea-attachements-proxy + debug: true + password: + from_secret: docker_password + username: + from_secret: docker_username + tags: + - latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6e2c4e6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM alpine:3.14.1 as alpine +RUN apk add -U --no-cache ca-certificates +FROM alpine:3.14.1 +EXPOSE 3000 +LABEL maintainer="dockerhub@enderware.de" +ENV GODEBUG netdns=go +COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ +ADD gitea-attachements-proxy /bin/ +ENTRYPOINT ["/bin/gitea-attachements-proxy"] \ No newline at end of file