add docker building in pipeline

This commit is contained in:
2024-05-15 20:28:53 +03:00
parent 26b326dd4f
commit 7f62c601df
13 changed files with 532 additions and 2 deletions

5
build/README.md Normal file
View File

@@ -0,0 +1,5 @@
## Сборка Docker
## Сборка Linux
### Debian

View File

@@ -0,0 +1,5 @@
Package: kube-forge
Version: 1.0
Architecture: amd64
Maintainer: Kvazaric <kvazaric.official@gmail.com>
Description: A program to install Kubernetes-based platform to facilitate the development, desting and dperation of Ccntainerized applications

View File

@@ -0,0 +1,4 @@
k8s-admin.conf
docs
*/build
examples

28
build/docker/Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
## Install dependencies
FROM python:3.12 as deps
WORKDIR /application
COPY ./requirements.txt ./
RUN apt-get update -y && \
apt-get install sshpass -y && \
pip3 install -r requirements.txt
## Build executable
FROM golang:alpine as builder
WORKDIR /application
COPY go.mod go.sum ./
RUN go mod download
WORKDIR /application
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -v -o kube-forge ./cmd/main/main.go
FROM deps
WORKDIR /application
COPY . .
COPY --from=builder /application/kube-forge /application/kube-forge
ENTRYPOINT ["./kube-forge", "-c", "config.yaml", "-d", "."]

1
build/version.txt Normal file
View File

@@ -0,0 +1 @@
1.0