add docker and cicd
continuous-integration/drone/push Build is passing Details

This commit is contained in:
garionion 2021-09-20 11:13:54 +02:00
parent fa7fb69f02
commit f3290ff6df
2 changed files with 31 additions and 0 deletions

22
.drone.yml Normal file
View File

@ -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

9
Dockerfile Normal file
View File

@ -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"]