-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-dockerhub-image.yaml
41 lines (35 loc) · 1.26 KB
/
build-dockerhub-image.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
id: build-dockerhub-image
namespace: company.team
tasks:
- id: build
type: io.kestra.plugin.docker.Build
dockerfile: |
FROM python:3.10
RUN pip install --upgrade pip
RUN pip install --no-cache-dir kestra requests "polars[all]"
tags:
- kestra/polars:latest
push: true
credentials:
registry: https://index.docker.io/v1/
username: "{{ secret('DOCKERHUB_USERNAME') }}"
password: "{{ secret('DOCKERHUB_PASSWORD') }}"
extend:
title: Build and push a docker image to DockerHub
description: >-
This flow will build a Docker image and push it to a remote container
registry.
1. The `dockerfile` parameter is a multiline string that contains the
Dockerfile content. However, it can also be a path to a file.
2. The `tags` parameter is a list of tags of the image to build. Make sure
to replace the `kestra` prefix with your DockerHub ID.
3. The `push` parameter is a boolean that indicates whether to push the
image to DockerHub.
4. Finally, make sure to securely store your DockerHub credentials as
secrets or environment variables.
tags:
- Docker
ee: false
demo: false
meta_description: This flow will build a Docker image and push it to a remote
container registry.