Merge pull request #1438 from rgaiacs/1437-avoid-jupyter-repo2docker

Avoid jupyter-repo2docker in the commad line
pull/1445/head
Yuvi 2025-08-14 15:38:51 -07:00 zatwierdzone przez GitHub
commit 1f1fab03e1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
6 zmienionych plików z 18 dodań i 14 usunięć

Wyświetl plik

@ -3,7 +3,7 @@
`repo2docker` is called with this command:
```
jupyter-repo2docker <source-repository>
repo2docker <source-repository>
```
where `<source-repository>` is a repository in one of [the supported repository providers](#repository-providers).
@ -12,7 +12,7 @@ For example, the following command will build an image of Peter Norvig's
[Pytudes] repository:
```
jupyter-repo2docker https://github.com/norvig/pytudes
repo2docker https://github.com/norvig/pytudes
```
Building the image may take a few minutes.
@ -35,7 +35,7 @@ dependencies and contents of the source repository in the built image.
To debug the container image being built, pass the `--debug` parameter:
> ```bash
> jupyter-repo2docker --debug https://github.com/norvig/pytudes
> repo2docker --debug https://github.com/norvig/pytudes
> ```
This will print the generated `Dockerfile`, build it, and run it.
@ -44,7 +44,7 @@ To see the generated `Dockerfile` without actually building it, pass `--no-build
This `Dockerfile` output is for **debugging purposes** of `repo2docker` only - it can not be used by Docker directly.
> ```bash
> jupyter-repo2docker --no-build --debug https://github.com/norvig/pytudes
> repo2docker --no-build --debug https://github.com/norvig/pytudes
> ```
## Build from a branch, commit or tag
@ -53,7 +53,7 @@ To build a particular branch and commit, use the argument `--ref` and
specify the `branch-name` or `commit-hash`. For example:
```
jupyter-repo2docker --ref 9ced85dd9a84859d0767369e58f33912a214a3cf https://github.com/norvig/pytudes
repo2docker --ref 9ced85dd9a84859d0767369e58f33912a214a3cf https://github.com/norvig/pytudes
```
:::{tip}
@ -70,7 +70,7 @@ flag for each variable that you want to define.
For example:
```bash
jupyter-repo2docker -e VAR1=val1 -e VAR2=val2 ...
repo2docker -e VAR1=val1 -e VAR2=val2 ...
```
You can also configure environment variables for all users of a repository using the
@ -81,7 +81,7 @@ You can also configure environment variables for all users of a repository using
## Command-line API
```{autoprogram} repo2docker.__main__:argparser
:prog: jupyter-repo2docker
:prog: repo2docker
```
[pytudes]: https://github.com/norvig/pytudes

Wyświetl plik

@ -165,13 +165,13 @@ automates this test.
```bash
#! /bin/bash -e
current_version=$(jupyter-repo2docker --version | sed s@+@-@)
current_version=$(repo2docker --version | sed s@+@-@)
echo "Comparing $(pwd) (local $current_version vs. $R2D_COMPARE_TO)"
basename="dockerfilediff"
diff_r2d_dockerfiles_with_version () {
docker run --rm -t -v "$(pwd)":"$(pwd)" --user 1000 jupyterhub/repo2docker:"$1" jupyter-repo2docker --no-build --debug "$(pwd)" &> "$basename"."$1"
jupyter-repo2docker --no-build --debug "$(pwd)" &> "$basename"."$current_version"
docker run --rm -t -v "$(pwd)":"$(pwd)" --user 1000 jupyterhub/repo2docker:"$1" repo2docker --no-build --debug "$(pwd)" &> "$basename"."$1"
repo2docker --no-build --debug "$(pwd)" &> "$basename"."$current_version"
# remove first line logging the path
sed -i '/^\[Repo2Docker\]/d' "$basename"."$1"

Wyświetl plik

@ -16,7 +16,7 @@ The use cases for `repo2docker` which drive most design decisions are:
1. Automated image building used by projects like
[BinderHub](http://github.com/jupyterhub/binderhub)
2. Manual image building and running the image from the command line client,
`jupyter-repo2docker`, by users interactively on their workstations
`repo2docker`, by users interactively on their workstations
## Deterministic output

Wyświetl plik

@ -37,7 +37,7 @@ In short, `repo2docker` is a tool to reproducibly build, run, and deploy these u
When you call `repo2docker` like so:
```
jupyter-repo2docker <source-repository>
repo2docker <source-repository>
```
It performs these steps:

Wyświetl plik

@ -6,7 +6,7 @@ This tutorial guides you through installing `repo2docker` and building your firs
## Install `repo2docker`
repo2docker requires Python 3.6 or above on Linux and macOS.
`repo2docker` requires Python 3.6 or above on Linux and macOS.
:::{admonition} Windows support is experimental
@ -23,6 +23,10 @@ Recent versions of Docker are recommended.
### Install `repo2docker` with `pip`
```{warning}
The name of the package on [PyPI](https://pypi.org/) is [`jupyter-repo2docker`](https://pypi.org/project/jupyter-repo2docker/) instead of `repo2docker`.
```
We recommend installing `repo2docker` with the `pip` tool:
```

Wyświetl plik

@ -33,7 +33,7 @@ by `repo2docker` to see how to configure the build process.
In each case you can build from these repository sources like so:
```bash
jupyter-repo2docker <repository-reference>
repo2docker <repository-reference>
```
## Supported version control systems