This commit is contained in:
Jay 2019-05-09 11:25:30 +08:00
commit 293b4ce795
4 changed files with 39 additions and 0 deletions

16
.drone.yml Normal file
View 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
View 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
View 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

3
README.md Normal file
View File

@ -0,0 +1,3 @@
## Golang AWS DDNS Service
[![Build Status](https://ci.trj.tw/api/badges/golang/go-ddns-svc/status.svg)](https://ci.trj.tw/golang/go-ddns-svc)