Docker Context ile TCP baglantisi duzeltildi
Some checks failed
Harita Build ve Deploy / build-and-deploy (push) Failing after 3m12s
Some checks failed
Harita Build ve Deploy / build-and-deploy (push) Failing after 3m12s
This commit is contained in:
@@ -6,36 +6,39 @@ jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# --- İŞTE EKSİK OLAN PARÇA BUYDU ---
|
||||
# Tüm adımlara "Docker'ı burada bulabilirsin" diyoruz.
|
||||
# Ortam değişkenini buraya sabitliyoruz
|
||||
env:
|
||||
DOCKER_HOST: tcp://localhost:2375
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
# -----------------------------------
|
||||
|
||||
steps:
|
||||
- name: Kodu Çek (Checkout)
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Buildx artık yukarıdaki ENV sayesinde Docker'ı bulacak
|
||||
# --- İŞTE ÇÖZÜM BURASI ---
|
||||
# Buildx action'ı TCP adresini anlamazsa, ona elle öğretiyoruz.
|
||||
- name: Docker Context Oluştur
|
||||
run: |
|
||||
docker context create my-context --docker "host=tcp://localhost:2375"
|
||||
docker context use my-context
|
||||
|
||||
- name: Docker Buildx Kurulumu
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3 # Versiyonu v3 yaptık
|
||||
with:
|
||||
driver: docker # Dind için en güvenlisi budur
|
||||
endpoint: my-context # Oluşturduğumuz context'i kullan diyoruz
|
||||
|
||||
- name: Docker Login (Gitea Registry)
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3 # Versiyonu v3 yaptık
|
||||
with:
|
||||
registry: git.konstantiniyye.studio
|
||||
username: gitea_admin
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Docker Build ve Push
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v5 # Versiyonu v5 yaptık
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
# Kullanıcı adını ve repo adını senin yapına göre sabitledim
|
||||
tags: git.konstantiniyye.studio/gitea_admin/dogu:latest
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
Reference in New Issue
Block a user