This commit is contained in:
Bensch
2026-02-24 13:52:32 +00:00
parent f200af753d
commit 4d7f91b116
5 changed files with 114 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
- name: Build via remote BuildKit
run: |
buildctl \
--addr tcp://buildkit.default.svc.cluster.local:1234 \
build \
--frontend dockerfile.v0 \
--local context=. \
--local dockerfile=. \
--output type=image,name=registry/myapp:latest,push=true

19
Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
# Base Image
FROM nginx:alpine
# MAINTAINER of the Dockerfile
MAINTAINER Bikram <bikramatmedium@gmail.com>
#Copy the index.html file /usr/share/nginx/html/
COPY index.html /usr/share/nginx/html/
#Expose Nginx Port
EXPOSE 80
#Start NginxService
CMD ["nginx", "-g", "daemon off;"]

22
deployment.yaml Normal file
View File

@@ -0,0 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: buildkitd
spec:
replicas: 1
selector:
matchLabels:
app: buildkitd
template:
metadata:
labels:
app: buildkitd
spec:
containers:
- name: buildkitd
image: moby/buildkit:latest
args: ["--addr", "tcp://0.0.0.0:1234"]
securityContext:
privileged: true
ports:
- containerPort: 1234

54
runner.yaml Normal file
View File

@@ -0,0 +1,54 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea-runner
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: gitea-runner
template:
metadata:
labels:
app: gitea-runner
spec:
containers:
- name: runner
image: gitea/act_runner:latest
imagePullPolicy: Always
env:
- name: GITEA_INSTANCE_URL
value: "https://git.stalwart.a1cloud.dev/"
- name: GITEA_RUNNER_REGISTRATION_TOKEN
value: "m5lhsDgMCHVxlBJ9FUadv28uPvpaQH3pKzFiFjqD"
- name: RUNNER_EXECUTOR
value: "shell"
- name: RUNNER_LABELS
value: "shell,buildkit"
- name: BUILDKIT_HOST
value: "tcp://buildkitd-service-name.namespace.svc.cluster.local:1234"
- name: GITEA_RUNNER_LABELS
value: "shell:host,buildkit:host"
volumeMounts:
- name: runner-data
mountPath: /data
volumes:
- name: runner-data
emptyDir: {}

10
service.yaml Normal file
View File

@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: buildkit
spec:
selector:
app: buildkitd
ports:
- port: 1234
targetPort: 1234