Build Docker image.
This commit is contained in:
parent
032a9f914e
commit
b5c2b8888b
|
@ -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
|
||||
|
||||
...
|
|
@ -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"]
|
Loading…
Reference in New Issue