@@ -7,7 +7,7 @@ from various perspectives.
77
88The ** buildpack** concept comes from [ Heroku] ( https://devcenter.heroku.com/articles/buildpacks )
99and Ruby on Rails' [ Convention over Configuration] ( http://rubyonrails.org/doctrine/#convention-over-configuration )
10- doctrine.
10+ doctrine.
1111
1212Instead of the user specifying a complete specification of exactly how they want
1313their environment to be, they can focus only on how their environment differs from a conventional
@@ -31,32 +31,32 @@ It takes the following steps to determine this:
3131
32321 . Look at the ordered list of ` BuildPack ` objects listed in ` Repo2Docker.buildpacks `
3333 traitlet. This is populated with a default set of buildpacks in most-specific-to-least-specific
34- order. Other applications using this can add / change this using traditional
34+ order. Other applications using this can add / change this using traditional
3535 [ traitlet] ( http://traitlets.readthedocs.io/en/stable/ ) configuration mechanisms.
36362 . Calls the ` detect ` method of each ` BuildPack ` object. This method assumes that the repository
3737 is present in the current working directory, and should return ` True ` if the repository is
3838 something that it should be used for. For example, a ` BuildPack ` that uses ` conda ` to install
3939 libraries can check for presence of an ` environment.yml ` file and say 'yes, I can handle this
4040 repository' by returning ` True ` . Usually buildpacks look for presence of specific files
4141 (` requirements.txt ` , ` environment.yml ` , ` install.R ` , etc) to determine if they can handle a
42- repository or not.
42+ repository or not.
43433 . If no ` BuildPack ` returns true, then repo2docker will use the default ` BuildPack ` (defined in
4444 ` Repo2Docker.default_buildpack ` traitlet).
4545
4646## Build base environment
4747
4848Once a buildpack is chosen, it builds a ** base environment** that is mostly the same for various
49- repositories built with the same buildpack.
49+ repositories built with the same buildpack.
5050
5151For example, in ` CondaBuildPack ` , the base environment consists of installing [ miniconda] ( https://conda.io/miniconda.html )
5252and basic notebook packages (from ` repo2docker/buildpacks/conda/environment.yml ` ). This is going
53- to be the same for most repositories built with ` CondaBuildPack ` , so we want to use
54- [ docker layer caching] ( https://thenewstack.io/understanding-the-docker-cache-for-faster-builds/ ) as
53+ to be the same for most repositories built with ` CondaBuildPack ` , so we want to use
54+ [ docker layer caching] ( https://thenewstack.io/understanding-the-docker-cache-for-faster-builds/ ) as
5555much as possible for performance reasons. Next time a repository is built with ` CondaBuildPack ` ,
5656we can skip straight to the ** copy** step (since the base environment docker image * layers* have
5757already been built and cached).
5858
59- The ` get_build_scripts ` and ` get_build_script_files ` methods are primarily used for this.
59+ The ` get_build_scripts ` and ` get_build_script_files ` methods are primarily used for this.
6060` get_build_scripts ` can return arbitrary bash script lines that can be run as different users,
6161and ` get_build_script_files ` is used to copy specific scripts (such as a conda installer) into
6262the image to be run as pat of ` get_build_scripts ` . Code in either has following constraints:
@@ -82,10 +82,10 @@ the `build` method of the `BuildPack` base class.
8282
8383The ** assemble** stage builds the specific environment that is requested by the repository.
8484This usually means installing required libraries specified in a format native to the language
85- (` requirements.txt ` , ` environment.yml ` , ` REQUIRE ` , ` install.R ` , etc).
85+ (` requirements.txt ` , ` environment.yml ` , ` REQUIRE ` , ` install.R ` , etc).
8686
8787Most of this work is done in ` get_assemble_scripts ` method. It can return arbitrary bash script
88- lines that can be run as different users, and has access to the repository contents (unlike
88+ lines that can be run as different users, and has access to the repository contents (unlike
8989` get_build_scripts ` ). The docker image layers produced by this usually can not be cached,
9090so less restrictions apply to this than to ` get_build_scripts ` .
9191
0 commit comments