Add Dockerfile for container build
This commit is contained in:
parent
a6ae9b081a
commit
5ba14d98c3
11
.drone.yml
11
.drone.yml
@ -14,4 +14,13 @@ steps:
|
||||
commands:
|
||||
- golangci-lint -v run
|
||||
environment:
|
||||
GOFLAGS: -mod=vendor
|
||||
GOFLAGS: -mod=vendor
|
||||
- name: build
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: registry_user
|
||||
password:
|
||||
from_secret: registry_password
|
||||
repo: fat0troll/fwzookeeper_helper
|
||||
auto_tag: true
|
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
FROM fat0troll/tdlib-golangci AS builder
|
||||
|
||||
COPY . /build/
|
||||
WORKDIR /build/
|
||||
|
||||
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GOFLAGS='-mod=vendor' go build -ldflags '-w -extldflags "-static"'
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=builder /build/fwzookeeper_helper /usr/local/bin/fw_zookeeper_helper
|
||||
|
||||
VOLUME ["/data"]
|
||||
|
||||
ENTRYPOINT [ "/usr/local/bin/fw_zookeeper_helper" ]
|
Reference in New Issue
Block a user