diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..ce494cc --- /dev/null +++ b/.drone.yml @@ -0,0 +1,23 @@ +kind: pipeline +type: docker +name: default + +steps: + - name: build + image: golang + commands: + - CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' . + - go test ./... + + - 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