|
|
@@ -5,35 +5,35 @@
|
|
|
# Build a Docker image from a File.
|
|
|
#
|
|
|
|
|
|
-id: docker-file-build
|
|
|
-namespace: # your-namespace
|
|
|
+id: docker-file-build # <- Replace with your task id...
|
|
|
+namespace: your-namespace # <- Replace with your namespace...
|
|
|
|
|
|
tasks:
|
|
|
|
|
|
- - id: file
|
|
|
- type: io.kestra.core.tasks.flows.WorkingDirectory
|
|
|
+ - id: file # <- Replace with your task id...
|
|
|
+ type: io.kestra.plugin.core.flow.WorkingDirectory
|
|
|
tasks:
|
|
|
- - id: createFiles
|
|
|
- type: io.kestra.core.tasks.storages.LocalFiles
|
|
|
+ - id: createFiles # <- Replace with your task id...
|
|
|
+ type: io.kestra.plugin.core.storage.LocalFiles
|
|
|
inputs:
|
|
|
- Dockerfile: |
|
|
|
+ Dockerfile: | # <- Replace with your Dockerfile content...
|
|
|
FROM alpine:latest
|
|
|
WORKDIR /app
|
|
|
COPY . /app
|
|
|
RUN apk add --update python3
|
|
|
CMD [ "python", "main.py"]
|
|
|
- main.py: |
|
|
|
+ main.py: | # <- Replace with your Python script content...
|
|
|
if __name__ == "__main__":
|
|
|
print("Hello from Docker!")
|
|
|
exit(0)
|
|
|
|
|
|
- - id: build
|
|
|
+ - id: build # <- Replace with your task id...
|
|
|
type: io.kestra.plugin.docker.Build
|
|
|
- dockerfile: "src/Dockerfile"
|
|
|
+ dockerfile: "src/Dockerfile" # <- Replace with your Dockerfile path...
|
|
|
tags:
|
|
|
- - your-username/your-repository:your-tag
|
|
|
+ - your-username/your-repository:your-tag # <- Replace with your Docker image tag...
|
|
|
push: true
|
|
|
credentials:
|
|
|
registry: https://index.docker.io/v1/
|
|
|
- username: "{{ secret('YOUR_USERNAME') }}"
|
|
|
- password: "{{ secret('YOUR_PASSWORD') }}"
|
|
|
+ username: "{{ secret('YOUR_USERNAME') }}" # <- Replace with your Docker Hub username...
|
|
|
+ password: "{{ secret('YOUR_PASSWORD') }}" # <- Replace with your Docker Hub password...
|