Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions 15 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@

Before you begin creating an application with this `devfile` code sample, it's helpful to understand the relationship between the `devfile` and `Dockerfile` and how they contribute to your build. You can find these files at the following URLs:

- [Python `devfile.yaml`](https://github.com/devfile-samples/devfile-sample-python-basic/blob/main/devfile.yaml)
- [Python `Dockerfile`](https://github.com/devfile-samples/devfile-sample-python-basic/blob/main/docker/Dockerfile)
- [Python Sample `devfile.yaml`](https://github.com/devfile-samples/devfile-sample-python-basic/blob/v2.0.0/devfile.yaml)
- [Python Sample `Dockerfile`](https://github.com/devfile-samples/devfile-sample-python-basic/blob/v2.0.0/docker/Dockerfile)
- [Parent Python Stack `devfile.yaml`](https://github.com/devfile/registry/blob/main/stacks/python/3.0.0/devfile.yaml)

1. The `devfile.yaml` file has an [`image-build` component](https://github.com/devfile-samples/devfile-sample-python-basic/blob/main/devfile.yaml#L24-L30) that points to your `Dockerfile`.
2. The [`docker/Dockerfile`](https://github.com/devfile-samples/devfile-sample-python-basic/blob/main/docker/Dockerfile) contains the instructions you need to build the code sample as a container image.
3. The `devfile.yaml` [`kubernetes-deploy` component](https://github.com/devfile-samples/devfile-sample-python-basic/blob/main/devfile.yaml#L31-L44) points to a `deploy.yaml` file that contains instructions for deploying the built container image.
4. The `devfile.yaml` [`deploy` command](https://github.com/devfile-samples/devfile-sample-python-basic/blob/main/devfile.yaml#L46-L59) completes the [outerloop](https://devfile.io/docs/2.2.0/innerloop-vs-outerloop) deployment phase by pointing to the `image-build` and `kubernetes-deploy` components to create your application.
This code sample inherits the components and commands of the specified parent devfile. The sample devfile overrides and extends parts of the parent devfile, in this case parts of the `deploy` component.

1. The parent `devfile.yaml` file has an [`build` component](https://github.com/devfile/registry/blob/main/stacks/python/3.0.0/devfile.yaml#L39-L45) that points to your `Dockerfile`.
2. The [`docker/Dockerfile`](https://github.com/devfile-samples/devfile-sample-python-basic/blob/v2.0.0/docker/Dockerfile) contains the instructions you need to build the code sample as a container image.
3. The `devfile.yaml` [`deploy` component](https://github.com/devfile-samples/devfile-sample-python-basic/blob/v2.0.0/devfile.yaml#L25-L37) overrides the parent `deploy` and points to a `deploy.yaml` file that contains instructions for deploying the built container image.
4. The parent `devfile.yaml` [`deploy` command](https://github.com/devfile/registry/blob/main/stacks/python/3.0.0/devfile.yaml#L82-L89) completes the [outerloop](https://devfile.io/docs/2.2.0/innerloop-vs-outerloop) deployment phase by pointing to the `build` and `deploy` components to create your application.

### Additional resources

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.