forked from coop-cloud/abra
feat: add docker image, auto-built using CI
This commit is contained in:
parent
1403eac72c
commit
f484021148
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@ -0,0 +1,4 @@
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
*.swp
|
||||
*.swo
|
20
.drone.yml
20
.drone.yml
@ -57,7 +57,25 @@ steps:
|
||||
depends_on:
|
||||
- fetch
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: publish image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
auto_tag: true
|
||||
username: 3wordchant
|
||||
password:
|
||||
from_secret: git_coopcloud_tech_token_3wc
|
||||
repo: git.coopcloud.tech/coop-cloud/abra
|
||||
tags: latest
|
||||
depends_on:
|
||||
- run shellcheck
|
||||
- run flake8
|
||||
- run unit tests
|
||||
- test installation script
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
volumes:
|
||||
- name: deps
|
||||
|
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
FROM golang:1.18-alpine AS build
|
||||
|
||||
ENV GOPRIVATE coopcloud.tech
|
||||
|
||||
RUN apk add --no-cache make git gcc musl-dev
|
||||
|
||||
COPY . /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN CGO_ENABLED=0 make build
|
||||
# RUN rm go.sum && go get -v -d -u ./... && \
|
||||
# make build
|
||||
|
||||
RUN ls /app
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=build /app/abra /abra
|
||||
|
||||
ENTRYPOINT ["/abra"]
|
Loading…
Reference in New Issue
Block a user