--- # Kaniko builds images without docker # # NOTES: # If this is your first kaniko, you need to add a token: # In gogs: User->Settings->Applications # kubectl create secret generic git-token --from-literal='GIT_TOKEN=' # # You need to add credentials to the docker registry: # kubectl create secret docker-registry docker-regcred \ # --docker-server=https://index.docker.io/v1/ \ # --docker-username= \ # --docker-password= apiVersion: v1 kind: Pod metadata: generateName: kaniko-gogs spec: containers: - name: kaniko-gogs- image: gcr.io/kaniko-project/executor:v1.9.1 args: - "--dockerfile=./Dockerfile" - "--context=git://git.monkeybox.org/Containers/gogs#refs/heads/main" - "--destination=fdamstra/gogs:latest" env: - name: GIT_TOKEN valueFrom: secretKeyRef: name: git-token key: GIT_TOKEN volumeMounts: - name: docker-config mountPath: /kaniko/.docker/ dnsPolicy: "None" dnsConfig: nameservers: - 10.42.42.239 - 10.42.42.1 searches: - default.svc.cluster.local - svc.cluster.local - cluster.local options: - name: ndots value: "2" - name: edns0 - name: trust-ad restartPolicy: Never volumes: - name: docker-config secret: secretName: docker-regcred items: - key: .dockerconfigjson path: config.json