Disable cgo, add docker support
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
516390b17d
commit
7830955b4f
10
.drone.yml
10
.drone.yml
@ -11,6 +11,7 @@ steps:
|
||||
commands:
|
||||
- mkdir -p /build
|
||||
- go mod download
|
||||
- export CGO_ENABLED=0
|
||||
- goc -o /build/dlrouter
|
||||
environment:
|
||||
GOOS: linux,windows,darwin
|
||||
@ -36,6 +37,15 @@ steps:
|
||||
from_secret: gitea_token
|
||||
when:
|
||||
event: tag
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: registry.meow.tf/tyler/armbian-router
|
||||
registry: registry.meow.tf
|
||||
volumes:
|
||||
- name: build
|
||||
temp: {}
|
11
Dockerfile
Normal file
11
Dockerfile
Normal file
@ -0,0 +1,11 @@
|
||||
FROM golang:alpine AS builder
|
||||
|
||||
ADD . /src
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
RUN CGO_ENABLED=0 go build -o /src/dlrouter
|
||||
|
||||
FROM alpine
|
||||
|
||||
COPY --from=builder /src/dlrouter /usr/bin/dlrouter
|
Loading…
Reference in New Issue
Block a user