-
Notifications
You must be signed in to change notification settings - Fork 381
Make Podman support more prominent in the documentation #1471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rgaiacs
wants to merge
20
commits into
jupyterhub:main
Choose a base branch
from
rgaiacs:document-podman-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
37213bf
Add support to DockerEngine
rgaiacs 0393651
Use "container" instead of Docker when possible in index.md
rgaiacs 29a4ddf
Use "container" instead of Docker when possible in start.md
rgaiacs 42961e1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] c43beb0
Auto configure container_cli property based on DOCKER_HOST
rgaiacs b2051a8
Add podman as container cli for GitHub Actions
rgaiacs 063f3f0
Select correct hostname for Podman
rgaiacs df05810
Add note about Podman service to documentation
rgaiacs 60b1656
Enable Podman socket during test
rgaiacs e18d08d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1879fe8
Avoid infinite loop in test
rgaiacs 8e089f0
Hide output of "docker version" test
rgaiacs 791eec7
Add WorkingDir to bridge the gap with Podman
rgaiacs d21d00c
Fix tests/unit/test_app.py::test_extra_buildx_build_args
rgaiacs 8c67ad7
Make DOCKER_HOST more robust
rgaiacs f3fe672
Prefer to use attribute over internal variable
rgaiacs 172ab66
Minor improve to docker.py wrap
rgaiacs 0309c88
Expose DOCKER_CLI from docker.py
rgaiacs ae4ebb1
Mark some tests with @pytest.mark.skipif
rgaiacs 6c93191
Skip registry test for Podman
rgaiacs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,47 +2,72 @@ | |||||
|
|
||||||
| This tutorial guides you through installing `repo2docker` and building your first environment image. | ||||||
|
|
||||||
| (install)= | ||||||
| ## Prerequisite | ||||||
|
|
||||||
| ## Install `repo2docker` | ||||||
| ### Python | ||||||
|
|
||||||
| `repo2docker` requires Python 3.6 or above on Linux and macOS. | ||||||
| `repo2docker` requires Python 3.6 or above. | ||||||
|
|
||||||
| :::{admonition} Windows support is experimental | ||||||
| ### Container Engine | ||||||
|
|
||||||
| This [article about using Windows and the WSL](https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly) (Windows Subsystem for Linux or | ||||||
| Bash on Windows) provides additional information about Windows and Docker. | ||||||
| ::: | ||||||
| `repo2docker` requires a container engine compatible with the specification published by the [Open Container Initiative](https://opencontainers.org/). | ||||||
|
|
||||||
| ### Prerequisite: Install Docker | ||||||
| #### Docker | ||||||
|
|
||||||
| Install [Docker](https://www.docker.com), as it is required to build Docker images. | ||||||
| The [Community Edition](https://docs.docker.com/install/) is available for free. | ||||||
| ```{important} | ||||||
| Only the [Docker Engine](https://docs.docker.com/engine/) is an open source. [Docker Desktop](https://docs.docker.com/get-started/get-docker/) requires a license. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| ``` | ||||||
|
|
||||||
| Recent versions of Docker are recommended. | ||||||
| Follow [Docker's official installation steps](https://docs.docker.com/get-started/get-docker/). | ||||||
|
|
||||||
| ### Install `repo2docker` with `pip` | ||||||
| #### Podman | ||||||
|
|
||||||
| ```{warning} | ||||||
| The name of the package on [PyPI](https://pypi.org/) is [`jupyter-repo2docker`](https://pypi.org/project/jupyter-repo2docker/) instead of `repo2docker`. | ||||||
| ``` | ||||||
| Follow [Podman's official installation steps](https://podman.io/docs/installation). | ||||||
|
|
||||||
| We recommend installing `repo2docker` with the `pip` tool: | ||||||
| After complete the installation of Podman, | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ``` | ||||||
| 1. creates a [listening service for Podman](https://docs.podman.io/en/latest/markdown/podman-system-service.1.html) by running | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ```bash | ||||||
| systemctl --user start podman.socket | ||||||
| ``` | ||||||
|
|
||||||
| 1. configure the `DOCKER_HOST` environment variable following [Podman's official procedure](https://podman-desktop.io/docs/migrating-from-docker/using-the-docker_host-environment-variable#procedure). You might want to configure the `DOCKER_HOST` environment variable to persist in your `~/.bashrc`. | ||||||
|
|
||||||
| (install)= | ||||||
|
|
||||||
| ## Install `repo2docker` | ||||||
|
|
||||||
| ### Install `repo2docker` with `pip` | ||||||
|
|
||||||
| It is recommend to install `repo2docker` with the `pip` tool: | ||||||
|
|
||||||
| ```bash | ||||||
| python3 -m pip install jupyter-repo2docker | ||||||
| ``` | ||||||
|
|
||||||
| (usage)= | ||||||
|
|
||||||
| ## Build a repository with `repo2docker` | ||||||
|
|
||||||
| Now that you've installed Docker and `repo2docker`, we can build a repository. | ||||||
| To do so, follow these steps. | ||||||
| Now that you've installed a container engine and `repo2docker`, you can build a repository. | ||||||
| To do so, continue following this guide. | ||||||
|
|
||||||
| ### Start the container engine | ||||||
|
|
||||||
| ### Start Docker | ||||||
| Ensure that the container engine is running. | ||||||
|
|
||||||
| Follow the [instructions for starting Docker](https://docs.docker.com/engine/daemon/start/) to start a Docker process. | ||||||
| #### Docker | ||||||
|
|
||||||
| Follow the [offcial instructions for starting Docker](https://docs.docker.com/engine/daemon/start/). | ||||||
|
|
||||||
| #### Podman | ||||||
|
|
||||||
| Run | ||||||
|
|
||||||
| ```bash | ||||||
| podman info | ||||||
| ``` | ||||||
|
|
||||||
| ### Build an image from a URL | ||||||
|
|
||||||
|
|
@@ -55,12 +80,12 @@ jupyter-repo2docker https://github.com/binder-examples/requirements | |||||
| You'll see `repo2docker` take the following actions: | ||||||
|
|
||||||
| 1. Inspect the repository for [configuration files](#config-files). It will detect the `requirements.txt` file in the repository. | ||||||
| 2. Build a Docker image using the configuration files. In this case, the `requirements.txt` file will correspond to a Python environment. | ||||||
| 2. Build a container image using the configuration files. In this case, the `requirements.txt` file will correspond to a Python environment. | ||||||
| 3. Run the image to let you explore the repository interactively. | ||||||
|
|
||||||
| Click the link provided and you'll be taken to an interactive Jupyter Notebook interface where you can run commands interactively inside the environment. | ||||||
|
|
||||||
| ## Learn more | ||||||
|
|
||||||
| This is a simple example building an environment image for your repository. | ||||||
| To learn more about the kinds of source repositories, environments, and use-cases that repo2docker supports, see [the `repo2docker` user guide](./use/index.md). | ||||||
| To learn more about the kinds of source repositories, environments, and use-cases that `repo2docker` supports, see [the `repo2docker` user guide](./use/index.md). | ||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doubles the number of tests in the matrix, which means PR runs will take even longer, and the chance of a failure due to flakiness doubles.
I don't think we need to run all tests with Podman, just a subset, which we can do by adding them to the
include:section below