adds dockerfile
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Marvin Steadfast 2021-01-18 10:06:39 +01:00
parent 2171d0d238
commit 58908e29de
2 changed files with 44 additions and 0 deletions

31
.drone.yml Normal file
View File

@ -0,0 +1,31 @@
---
kind: pipeline
name: default
steps:
- name: fetch
image: docker:git
commands:
- git fetch --tags
- name: build
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: quay.io/xsteadfastx/govanityurls
registry: quay.io
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
volumes:
- name: dockersock
temp: {}

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM golang:alpine AS build
WORKDIR /go/src/app
COPY . .
RUN set -ex \
&& CGO_ENABLED=0 go install -a -ldflags '-w -s -extldflags "-static"'
FROM scratch
COPY --from=build /go/bin/govanityurls /govanityurls
ENTRYPOINT ["/govanityurls"]