Build Docker image.

This commit is contained in:
Syfaro 2019-11-09 14:36:28 -06:00
parent 032a9f914e
commit b5c2b8888b
2 changed files with 32 additions and 0 deletions

21
.drone.yml Normal file
View File

@ -0,0 +1,21 @@
---
kind: pipeline
name: default
platform:
os: linux
arch: amd64
steps:
- name: build
image: plugins/docker
settings:
auto_tag: true
password:
from_secret: docker_password
registry: registry.huefox.com
repo: registry.huefox.com/goget-proxy
username:
from_secret: docker_username
...

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM golang:alpine AS builder
WORKDIR /app
COPY . ./
RUN go build -o main
FROM alpine
ENV HTTP_HOST=:8080
EXPOSE 8080
COPY --from=builder /app/main .
RUN apk add ca-certificates
CMD ["./main"]