christianlempa-boilerplates/kestra/docker/file-build.yaml

40 lines
985 B
YAML
Raw Normal View History

---
2024-04-19 15:23:14 +02:00
# Kestra Docker File Build Template
# ---
2024-04-21 11:59:31 +02:00
#
2024-04-19 15:23:14 +02:00
# Build a Docker image from a File.
#
id: docker-file-build
namespace: # your-namespace
2024-04-19 15:23:14 +02:00
tasks:
- id: file
type: io.kestra.core.tasks.flows.WorkingDirectory
tasks:
- id: createFiles
type: io.kestra.core.tasks.storages.LocalFiles
inputs:
Dockerfile: |
FROM alpine:latest
WORKDIR /app
COPY . /app
RUN apk add --update python3
CMD [ "python", "main.py"]
main.py: |
if __name__ == "__main__":
print("Hello from Docker!")
exit(0)
- id: build
type: io.kestra.plugin.docker.Build
dockerfile: "src/Dockerfile"
2024-04-21 11:59:31 +02:00
tags:
2024-04-19 15:23:14 +02:00
- your-username/your-repository:your-tag
push: true
credentials:
registry: https://index.docker.io/v1/
username: "{{ secret('YOUR_USERNAME') }}"
password: "{{ secret('YOUR_PASSWORD') }}"