all
This commit is contained in:
21
Data/Kestra/pipelines/demo/build-docker-1.yaml
Normal file
21
Data/Kestra/pipelines/demo/build-docker-1.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
id: build-docker-1
|
||||
namespace: demo
|
||||
|
||||
tasks:
|
||||
- id: git
|
||||
type: io.kestra.core.tasks.flows.WorkingDirectory
|
||||
tasks:
|
||||
- id: clone
|
||||
type: io.kestra.plugin.git.Clone
|
||||
url: https://github.com/christianlempa/hackbox
|
||||
branch: main
|
||||
|
||||
- id: build
|
||||
type: io.kestra.plugin.docker.Build
|
||||
dockerfile: "src/Dockerfile"
|
||||
tags:
|
||||
- registry.hub.docker.com/xcad2k/hackbox-test:latest
|
||||
push: true
|
||||
credentials:
|
||||
username: "{{ envs.dockerhub_username }}"
|
||||
password: "{{ envs.dockerhub_password }}"
|
30
Data/Kestra/pipelines/demo/build-docker-2.yaml
Normal file
30
Data/Kestra/pipelines/demo/build-docker-2.yaml
Normal file
@ -0,0 +1,30 @@
|
||||
id: build-docker-2
|
||||
namespace: demo
|
||||
|
||||
tasks:
|
||||
- id: directory
|
||||
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: "Dockerfile"
|
||||
tags:
|
||||
- registry.hub.docker.com/xcad2k/hello-docker:latest
|
||||
push: true
|
||||
credentials:
|
||||
username: "{{ envs.dockerhub_username }}"
|
||||
password: "{{ envs.dockerhub_password }}"
|
Reference in New Issue
Block a user