kopia lustrzana https://github.com/jupyterhub/repo2docker
Merge pull request #1438 from rgaiacs/1437-avoid-jupyter-repo2docker
Avoid jupyter-repo2docker in the commad linepull/1445/head
commit
1f1fab03e1
|
@ -3,7 +3,7 @@
|
||||||
`repo2docker` is called with this command:
|
`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).
|
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:
|
[Pytudes] repository:
|
||||||
|
|
||||||
```
|
```
|
||||||
jupyter-repo2docker https://github.com/norvig/pytudes
|
repo2docker https://github.com/norvig/pytudes
|
||||||
```
|
```
|
||||||
|
|
||||||
Building the image may take a few minutes.
|
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:
|
To debug the container image being built, pass the `--debug` parameter:
|
||||||
|
|
||||||
> ```bash
|
> ```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.
|
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.
|
This `Dockerfile` output is for **debugging purposes** of `repo2docker` only - it can not be used by Docker directly.
|
||||||
|
|
||||||
> ```bash
|
> ```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
|
## 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:
|
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}
|
:::{tip}
|
||||||
|
@ -70,7 +70,7 @@ flag for each variable that you want to define.
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```bash
|
```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
|
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
|
## Command-line API
|
||||||
|
|
||||||
```{autoprogram} repo2docker.__main__:argparser
|
```{autoprogram} repo2docker.__main__:argparser
|
||||||
:prog: jupyter-repo2docker
|
:prog: repo2docker
|
||||||
```
|
```
|
||||||
|
|
||||||
[pytudes]: https://github.com/norvig/pytudes
|
[pytudes]: https://github.com/norvig/pytudes
|
||||||
|
|
|
@ -165,13 +165,13 @@ automates this test.
|
||||||
```bash
|
```bash
|
||||||
#! /bin/bash -e
|
#! /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)"
|
echo "Comparing $(pwd) (local $current_version vs. $R2D_COMPARE_TO)"
|
||||||
basename="dockerfilediff"
|
basename="dockerfilediff"
|
||||||
|
|
||||||
diff_r2d_dockerfiles_with_version () {
|
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"
|
docker run --rm -t -v "$(pwd)":"$(pwd)" --user 1000 jupyterhub/repo2docker:"$1" repo2docker --no-build --debug "$(pwd)" &> "$basename"."$1"
|
||||||
jupyter-repo2docker --no-build --debug "$(pwd)" &> "$basename"."$current_version"
|
repo2docker --no-build --debug "$(pwd)" &> "$basename"."$current_version"
|
||||||
|
|
||||||
# remove first line logging the path
|
# remove first line logging the path
|
||||||
sed -i '/^\[Repo2Docker\]/d' "$basename"."$1"
|
sed -i '/^\[Repo2Docker\]/d' "$basename"."$1"
|
||||||
|
|
|
@ -16,7 +16,7 @@ The use cases for `repo2docker` which drive most design decisions are:
|
||||||
1. Automated image building used by projects like
|
1. Automated image building used by projects like
|
||||||
[BinderHub](http://github.com/jupyterhub/binderhub)
|
[BinderHub](http://github.com/jupyterhub/binderhub)
|
||||||
2. Manual image building and running the image from the command line client,
|
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
|
## Deterministic output
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ In short, `repo2docker` is a tool to reproducibly build, run, and deploy these u
|
||||||
When you call `repo2docker` like so:
|
When you call `repo2docker` like so:
|
||||||
|
|
||||||
```
|
```
|
||||||
jupyter-repo2docker <source-repository>
|
repo2docker <source-repository>
|
||||||
```
|
```
|
||||||
|
|
||||||
It performs these steps:
|
It performs these steps:
|
||||||
|
|
|
@ -6,7 +6,7 @@ This tutorial guides you through installing `repo2docker` and building your firs
|
||||||
|
|
||||||
## Install `repo2docker`
|
## 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
|
:::{admonition} Windows support is experimental
|
||||||
|
|
||||||
|
@ -23,6 +23,10 @@ Recent versions of Docker are recommended.
|
||||||
|
|
||||||
### Install `repo2docker` with `pip`
|
### 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:
|
We recommend installing `repo2docker` with the `pip` tool:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -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:
|
In each case you can build from these repository sources like so:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
jupyter-repo2docker <repository-reference>
|
repo2docker <repository-reference>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Supported version control systems
|
## Supported version control systems
|
||||||
|
|
Ładowanie…
Reference in New Issue