Merge branch 'master' of https://git.trj.tw/golang/go-ddns-svc
This commit is contained in:
commit
293b4ce795
16
.drone.yml
Normal file
16
.drone.yml
Normal file
@ -0,0 +1,16 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: 'build image'
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: docker.mtfos.xyz
|
||||
repo: docker.mtfos.xyz/mtfos/aws-ddns
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_COMMIT}
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM golang:1.12-alpine as builder
|
||||
WORKDIR /data
|
||||
COPY . .
|
||||
RUN apk add --no-cache make git ca-certificates && \
|
||||
make
|
||||
|
||||
FROM alpine:latest
|
||||
RUN apk add --no-cache ca-certificates
|
||||
WORKDIR /data
|
||||
COPY --from=builder /data/ddns-svc /usr/bin
|
||||
COPY config.default.yml config.yml
|
||||
EXPOSE 10230
|
||||
CMD ["/usr/bin/ddns-svc", "-f", "/data/config.yml"]
|
7
Makefile
Normal file
7
Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
.PHONY: clean build
|
||||
|
||||
build:
|
||||
GOOS=linux go build -o ddns-svc -ldflags "-s -w" .
|
||||
|
||||
clean:
|
||||
rm -rf ddns-svc && go clean
|
Loading…
Reference in New Issue
Block a user