Kacper Kowalik (Xarthisius)
7d948bda8d
Do not try to build the image with root as the primary user
...
Fixes #267 and #395
2019-05-08 14:55:43 -05:00
David Anthoff
47e09b2adb
Rename julia build packs
2019-02-26 08:52:44 -08:00
David Anthoff
3e9f8ec1de
Rearrange inputs
2019-02-25 15:18:02 -08:00
David Anthoff
c9770ee41e
Split julia support into legacy and current
2019-02-25 15:18:02 -08:00
Gladys Nalvarte
7609e7f0aa
Update build method in docker and legacy files
2019-02-19 10:45:48 +01:00
Gladys Nalvarte
5bf2eadcf8
Exposes CPU limit
2019-02-15 14:57:58 +01:00
Yuvi Panda
9eb78c34ab
Merge pull request #534 from betatim/test-test-test
...
[MRG] Add tests for port mapping conversion
2018-12-22 10:46:16 -08:00
Tim Head
7067663763
Add tests for port mapping conversion
2018-12-21 15:58:56 +01:00
Tim Head
e7018d7ca5
Add caching of already built repositories
...
Add tests for image caching
Adjust tests and main app for cached builds
Remove obsolete command-line handling
Remove print statement from test
Fix subdirectory handling
Put back exception instead of sys.exit()
2018-12-21 11:20:51 +01:00
yuvipanda
21154d3b86
Use REPO_DIR rather than REPO_PATH
...
https://github.com/jupyter/repo2docker/pull/507#issuecomment-448184651
is a good justification
2018-12-18 11:50:35 -08:00
yuvipanda
7f72a02108
Explicitly specify log message for docker build failures
2018-12-18 11:50:30 -08:00
yuvipanda
4858f42d7f
Only set REPO_PATH if explicitly passed in
...
Expanding env vars through ARG and ENV is too confusing
to get right.
2018-12-18 11:50:24 -08:00
yuvipanda
8b26bbe4e0
Allow setting REPO_PATH from commandline
2018-12-18 11:50:24 -08:00
James Bourbeau
929deaceb4
Remove f-strings
2018-12-18 08:57:53 -06:00
Min RK
22de9f40d0
get unittests passing again
...
fix some relative paths, temporary dirs, etc.
2018-12-17 13:11:45 +01:00
yuvipanda
8f56061e69
Don't call sys.exit from inside the class
...
Instead, we raise exceptions that can be caught and
handled by calling code instead
2018-12-14 13:15:33 -08:00
yuvipanda
a0ad3f92e3
Rename 'build' to 'dry_run'
...
A better description
2018-12-14 13:15:33 -08:00
yuvipanda
ac700c49be
Split 'build' function out of start
2018-12-14 13:15:33 -08:00
yuvipanda
cd04da56fc
Move cleanup_checkout automatic determination to main()
...
This is automaticaly determined only from commandline args,
so it should be in __main__
2018-12-14 13:15:33 -08:00
yuvipanda
e1ead75302
Move argument parsing out of Repo2Docker class
...
Argument parsing should only be used when calling from
the command line, and not be deeply tied into the class
itself. This makes it easier for folks to just set
traitlets on an empty class and start it, without having to
deal with passing arguments.
This breaks how people might already be using Repo2Docker as
a library, so should not be part of 0.7
2018-12-14 13:15:33 -08:00
James Bourbeau
db00d4982c
Use "local" label for local directory
2018-12-13 17:12:09 -06:00
James Bourbeau
2448730b75
Refactor test to use mock
2018-12-13 16:40:39 -06:00
James Bourbeau
99b1e7548a
Update test_labels.py
2018-12-13 12:43:45 -06:00
James Bourbeau
624ad94073
Remove getattr usage
2018-12-13 11:09:50 -06:00
James Bourbeau
2e31e6e80e
Add Dockerfile repo2docker labels
2018-12-12 22:05:06 -06:00
Tim Head
19d7c165d1
Merge pull request #482 from yuvipanda/push-log
...
Log a 'success' message when push is complete
2018-12-12 08:35:33 +01:00
Tim Head
69cd760e07
Merge pull request #494 from yuvipanda/util-tests
...
Add unit tests for repo2docker/utils.py
2018-12-11 13:05:08 +01:00
Tim Head
153765aa70
Add shutil import
2018-12-11 10:54:06 +01:00
yuvipanda
ee9b150ef8
Remove maybe_cleanup util function
...
It was used in exactly one place, and could be inlined with
minimal loss of clarity
2018-12-10 23:13:46 -08:00
yuvipanda
b4dbc9852e
Pass cache_from through to build
...
Got lost in a merge
2018-12-10 11:43:54 -08:00
yuvipanda
3b0b77259f
Inject docker.APIClient into methods that need them
...
- Creating a new client with 'auto' version causes repeated
unnecessary network requests to discover version of docker daemon.
- Testing is easier this way, since we can inject a mocked docker
client more easily
2018-12-10 11:18:01 -08:00
yuvipanda
3b515aa5f1
Merge branch 'master' into cache-from
...
Merges in this revert: https://github.com/jupyter/repo2docker/pull/481
2018-12-10 11:13:36 -08:00
yuvipanda
e8a352781b
Log a 'success' message when push is complete
2018-12-05 12:09:47 -08:00
Yuvi Panda
aeec658149
Revert "[MRG] Start reusing existing docker images if content hasn't changed"
2018-12-05 11:51:22 -08:00
yuvipanda
89665ea910
Use --cache-from as arg name to match docker build
2018-12-05 11:11:55 -08:00
yuvipanda
f5ced79d2c
Add traitlet for reuse_layers_from
...
More accurate name in our context
2018-12-05 11:11:27 -08:00
yuvipanda
1dacdd4c46
Allow specifying images to reuse cache from
...
This lets us explicitly specify images that repo2docker
should try to re-use cached layers from. Docker normally only
looks for layers from images that were *built* locally - if
we want it to look in images that were *pulled* from a registry,
we need to specify it here.
2018-12-05 11:10:50 -08:00
Yuvi Panda
8c9f08cd1e
Merge pull request #461 from betatim/caching-builds
...
[MRG] Start reusing existing docker images if content hasn't changed
2018-12-04 14:57:56 -08:00
Tim Head
2e7a5d9536
Tweak docstring to make it more understandable
2018-11-16 22:24:31 +01:00
Tim Head
39c2ae276b
Start reusing existing docker images if content hasn't changed
...
Content providers can specify a "content ID" which is used to identify
versions of the content. The ID is used in the docker image name and if
we find an existing image for a given content ID the build step is
skipped.
2018-11-04 13:23:04 +01:00
Chris Ostrouchov
1e3630cc10
Feature: Adding nix support for repo2docker
...
test url: https://gitlab.com/costrouc/nix-binder-example
2018-10-17 16:32:40 -04:00
Tim Head
b1dcbbe996
Adjust sub-directory tests after changing CWD behaviour
2018-10-16 13:46:00 +02:00
Tim Head
df7251dff6
Add context manager to change working dir
...
The context manager takes care of restoring the current working
directory when we are done. This is useful when the directory we set as
working directory stops existing.
2018-10-16 13:29:59 +02:00
Tim Head
4e1eff5f1b
Switch repository used to test sub-directory support
...
Using a repository that contains invlid instructions in the root of the
repository so that the test for subdirectory support will fail if
repo2docker doesn't actually switch into the requested sub-directory.
2018-10-16 13:28:08 +02:00
Tim Head
05bdc12651
Expand comments and doc strings
2018-10-16 09:46:17 +02:00
Tim Head
98d46957f1
Expand comment about using a local directory as checkout and source
2018-10-16 08:04:13 +02:00
Tim Head
c7dc5e1841
Remove explicit passing of logger instance
2018-10-16 08:04:13 +02:00
Tim Head
e5c7fdd341
Use the local content provider
...
This let's us remove some special casing around local directories from
the build process.
2018-10-16 08:04:13 +02:00
Tim Head
866dd4f800
Start using content providers
2018-10-16 08:04:13 +02:00
Derek Ludwig
2d2738b6db
Merge remote-tracking branch 'upstream/master'
2018-10-15 10:21:41 -07:00
Evert Rol
e9a31df758
Add an edit-mode option
...
This adds an option to run from a local repository in edit mode, where
changes in a running Docker container (for example, through a
notebook) are reflected in the local repository.
Implements the feature suggested in #357
2018-10-05 14:08:51 +02:00
Evert Rol
fca93270c9
Speed up cloning by using a depth of 1 if there is no refspec
...
To speed up cloning a repository, a shallow clone containing just the
last commit can be made, but *only* if no refspec is provided.
2018-10-01 15:51:24 +02:00
Derek Ludwig
39cf2411f9
Add error checking for subdir
2018-09-24 15:45:38 -07:00
Derek Ludwig
da5e84472a
Subdir support
2018-09-12 14:43:36 -07:00
Min RK
784bbff709
Merge pull request #358 from GladysNalvarte/connect_url
...
Specify custom_connect_url argument
2018-08-01 15:08:52 +02:00
Gladys Nalvarte
4587702119
Include corrections in app and test_connect_url files
2018-08-01 14:21:15 +02:00
Gladys Nalvarte
4c0cb69b80
Uses jupyter/notebook option to pass explicit hostname
2018-07-31 11:28:20 +02:00
Gladys Nalvarte
1512a6835a
Explicit hostname supplied to the container
2018-07-20 11:45:01 +02:00
Vanessa Sochat
21f698c1b7
adding note to future developers about why version is checked first
2018-07-16 06:47:59 -07:00
Vanessa Sochat
80d7ec9ff3
removing extra blank lines
2018-07-16 06:46:53 -07:00
Vanessa Sochat
a87f9520f1
adding version argument
2018-07-16 06:05:43 -07:00
Min RK
8075c5bf10
Merge pull request #343 from GladysNalvarte/split-docker-image
...
Test that images can start notebook servers in all the builders
2018-07-04 15:15:53 +02:00
Gladys Nalvarte
89686833c0
Updated app.py to make sure that images can start notebook servers
...
Includes an update of conftest.py file to check that the container
is running with jupyter notebook in all the builders.
2018-07-03 10:55:31 +02:00
Chris Holdgraf
544b1ba039
improving ref checker
2018-06-27 11:35:17 -07:00
Chris Holdgraf
728fb9707e
adding a ref checker util
2018-06-27 09:25:07 -07:00
Chris Holdgraf
8beb5e07bc
checking for origin/ explicitly
2018-06-27 08:30:10 -07:00
Chris Holdgraf
b1f504c480
Merge branch 'docs' of https://github.com/choldgraf/repo2docker into docs
2018-06-27 08:26:01 -07:00
Chris Holdgraf
c035dd22d4
auto-cleaning refs and updating tests for this
2018-06-27 08:25:05 -07:00
J. Forde
e1d47df30e
fixing conflict
2018-06-26 15:54:31 -07:00
Min RK
8adc402a04
Split run_image into two steps
...
for easier testing of image-running logic
2018-06-15 13:08:20 +02:00
Min RK
91fdfb4c29
prefer R to conda
...
allows mixing conda and R because R inherits from Python (and thereby conda)
2018-05-23 15:52:08 +02:00
Chris Holdgraf
8c22e42ee4
adding test and more informative error
2018-04-24 16:51:39 -07:00
Chris Holdgraf
e4b680de3f
adding docs about ref
2018-04-23 14:30:39 -07:00
Min RK
6b15b01fbd
inherit PythonBuildPack from conda buildpack
...
- sets up base env with conda
- installs packages with pip
- eliminates duplicate frozen envs for pip
- py3/py2 split happens in one class, not separate classes
2018-04-16 10:56:39 +02:00
Carol Willing
245e7d1995
update validation logic error message and docstring
2018-03-15 12:28:11 -07:00
Carol Willing
c231531f72
add yuvipanda text suggestions
2018-03-15 12:14:34 -07:00
Carol Willing
5b73968b1c
add docstrings and minor style edits
2018-03-15 12:14:33 -07:00
Carol Willing
9b25188928
organize imports
2018-03-15 12:12:44 -07:00
Min RK
c857f438b3
add appendix
...
supports adding arbitrary build steps to the end of Dockerfile
2018-02-14 11:34:10 +01:00
Yuvi Panda
4e174313f0
Merge pull request #229 from minrk/memtest
...
instantiate Repo2Docker to run tests
2018-02-12 11:24:10 -08:00
Min RK
3ab4503f7c
clone recursively
...
ensures submodules, if any, are included
2018-02-12 13:16:06 +01:00
Min RK
c164ef42b3
avoid calling sys.exit on success
2018-02-09 16:48:26 +01:00
Min RK
69db8f0ecb
allow passing argv to repo2docker.initialize
...
matching existing Applications
2018-02-09 16:48:26 +01:00
Min RK
1ffec7ded6
do not reuse BuildPack instances
...
rather than instantiating all buildpacks ahead of time, only instantiate as needed.
Makes it clear that a given BuildPack should only perform a single build
and a new BuildPack should be created for a subsequent build.
2018-02-09 13:14:34 +01:00
yuvipanda
e2099dbc97
Add basic R + IRKernel + RStudio support
...
This sets up R + RStudio + IRKernel for a repository that contains:
1. A `runtime.txt` file with the text:
r-<year>-<month>-<date>
Where 'year', 'month' and 'date' refer to a specific
date snapshot of https://mran.microsoft.com/timemachine
from which libraries are to be installed.
2. An optional `install.R` file that will be executed at build time,
and can be used for installing packages from both MRAN and GitHub.
It currently sets up R from the ubuntu repository being used. This
is unideal, and we should investigate other solutions!
Fixes #24
2018-02-02 09:25:19 -08:00
yuvipanda
398c82ee59
Add JuliaBuildPack to list of buildpacks
2018-02-01 15:55:58 -08:00
yuvipanda
e3bf8a16c6
Remove usage of LoggingConfigurable in BuildPack
2018-02-01 04:27:15 -08:00
yuvipanda
4d19924180
Use inheritance to define composed buildpacks
...
- This is much cleaner to understand than traitlets
- Remove 'name' and 'component' traitlets
2018-02-01 04:23:34 -08:00
Mukundan Sundararajan
515db356bf
Added checks to gracefully handle docker connect errors
...
Print actual error message on Docker client init errors
2018-01-11 17:43:29 -08:00
Mukundan Sundararajan
549bd9663b
add ability for port mapping to work with non jupyter-workflow
...
Added tests for port mapping
Added tests for publish all exposed ports
Added argument validation for ports argument
Added short form for argument publish. Changed variable name port to ports.
2018-01-11 16:49:09 -08:00
Romain Primet
d5d9b894b6
change parameter handling to 'action=append'
2018-01-09 08:22:38 +00:00
Romain Primet
5f95a5ddd3
Provide a flag to pass environment variables at runtime
2018-01-08 19:58:34 +00:00
Mukundan Sundararajan
9e2edb910a
Fixed run argument check for mounting volumes. Refactored argument validation test.
2017-12-24 15:03:09 -08:00
Yuvi Panda
5293080add
Merge pull request #175 from mukundans91/validateImageName
...
Added regex pattern based validation for image name argument
2017-12-23 15:11:02 -08:00
Mukundan Sundararajan
174c8000d2
Removed class and added function to validate docker image name
2017-12-22 19:45:16 -08:00
Mukundan Sundararajan
b6414c3ef4
Added a regex based patter definition for Image name
2017-12-22 16:17:32 -08:00
Mukundan Sundararajan
f04aa4da97
Changed to google style docstrings. Added image_name validation test.
2017-12-22 03:38:58 -08:00
yuvipanda
84c65445d2
Add missing import
2017-12-21 14:30:10 -08:00
yuvipanda
5674c0f7c6
Default username and user_id to currently running user
...
This is the defaults that you want if you are using r2d on your
local computer.
2017-12-21 14:01:22 -08:00
Mukundan Sundararajan
5372b09333
Added lowercase validation for image name argument
2017-12-20 19:41:20 -08:00