add docker building in pipeline
This commit is contained in:
5
build/README.md
Normal file
5
build/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
## Сборка Docker
|
||||
|
||||
## Сборка Linux
|
||||
|
||||
### Debian
|
||||
5
build/debian/DEBIAN/control
Normal file
5
build/debian/DEBIAN/control
Normal 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
|
||||
4
build/docker/.dockerignore
Normal file
4
build/docker/.dockerignore
Normal file
@@ -0,0 +1,4 @@
|
||||
k8s-admin.conf
|
||||
docs
|
||||
*/build
|
||||
examples
|
||||
28
build/docker/Dockerfile
Normal file
28
build/docker/Dockerfile
Normal 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
1
build/version.txt
Normal file
@@ -0,0 +1 @@
|
||||
1.0
|
||||
Reference in New Issue
Block a user