Wykres commitów

140 Commity (6aad2bcce208d07a9eb3071dd86cba17c1c54650)

Autor SHA1 Wiadomość Data
Samuel Gaist 09e503c4e6 feat: respect the root folder configured when looking for ignore files
See the design chapter for more details.
2024-01-19 08:45:06 +00:00
Samuel Gaist a51235f9a5 fix: remove the ignore .git folder default when no exclude files are present 2024-01-19 08:45:06 +00:00
Samuel Gaist d6670f4378 refactor: use list comprehension rather filter+lambda 2024-01-19 08:45:06 +00:00
Samuel Gaist 3028d07182 fix: create src directory in any case
The original behavior was to create an src directory with the content of the
repository. The creation would happen in any case (remote or local repository).
With the filtering in place and the default to remove the .git folder, it breaks
the build as the src folder can be missing.

This patch ensures that the directory is present in the tar so the build can
continue as it did until now.
2024-01-19 08:45:06 +00:00
Samuel Gaist 6b8b2334e7 feat: implement support for dockerignore and containerignore
Currently repo2docker creates a context object that includes the whole content
of the repository it builds an image for. Thus it includes folders like .git
which is usually something that has no interest in the final image, can take
quite a lot of space and most importantly, kills the caching of that layer.

This patch adds support for reading dockerignore and containerignore files that
are used to ensure only the relevant data are used to build the image.

By default it also excludes the .git folder if neither of these files are
provided.
2024-01-19 08:45:06 +00:00
Min RK e1051c3cb8
Merge branch 'main' into feat/new-base 2023-06-09 12:24:20 +02:00
Min RK 70a2de4e12
@lru_cache requires Python 3.8, use older @lru_cache() 2023-03-23 16:00:23 +01:00
Min RK 1e1d6ac20f
memoize all getters explicitly
rather than automatically
2023-03-23 15:58:27 +01:00
Min RK 52be2d3d64
memoize getters
ensures `get_` functions are called only once,
avoiding duplicate log statements
2023-02-16 13:13:17 +01:00
Yuvi Panda 99125ab179
Merge branch 'main' into feat/new-base 2023-01-06 22:28:27 -08:00
Simon Li 8f3f57ada7 Make platform configurable instead of only auto-detecting 2023-01-02 19:51:51 +00:00
Simon Li 064d91ae22 BuildPacks: support arm64 where possible (i.e. not R) 2023-01-02 19:51:51 +00:00
YuviPanda 20b0815257 Make base_image configurable
Fixes https://github.com/jupyterhub/repo2docker/issues/487
2022-12-10 13:17:16 -08:00
YuviPanda 8086937445 Don't hardcode ubuntu codename when getting r packages 2022-12-10 13:17:12 -08:00
YuviPanda 592ccb7596 Set ubuntu 20.04 as new base image
We would at some point need to set this as the default.
To prepare for that, I think we should make this an option
that is available, and run our tests on this too.

The R stack seems possibly currently unavailable for 20.04
(see https://community.rstudio.com/t/rstudio-server-ubuntu-20-04/64188)
but I'll try it out
2022-12-10 13:15:07 -08:00
pre-commit-ci[bot] 27c2b403db [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-31 22:32:14 +00:00
Erik Sundell 15a1fb6e2d refactor: manually add transitions to f-strings 2022-10-31 21:22:32 +01:00
pre-commit-ci[bot] 5a93542321 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-31 21:22:32 +01:00
Erik Sundell 2f13af8a29 Apply suggestions from code review 2022-10-31 13:09:17 +01:00
Nicholas Bollweg df733fc81b normalize ENV syntax, combine more layers 2022-10-31 13:09:17 +01:00
Nicholas Bollweg 803a1c223b ensure existence/permissions on custom target dir, if doesn't exist, repo copy slash 2022-10-31 13:09:17 +01:00
Min RK 945c45299f set USER root after each directive block
matches expectations in the directive sequences

not strictly required after preassemble because we have no root steps between preassemble and assemble,
so we could remove the `last_user = "root"` there instead

includes regression test
2022-01-25 14:48:37 +01:00
YuviPanda cbda2eba2b Move npm config setting to the conda buildpack
Since everything is based off the conda buildpack now,
and that is where we get npm from
2021-07-03 02:09:46 +05:30
YuviPanda 1d53990f34 Remove nodesource' nodejs
We get node from the default JupyterLab install, since that
comes from conda-forge. This was not the case when we started -
we installed JupyterLab with pip. We no longer need the nodesource
node.

All the env vars, etc should still work!
2021-07-03 02:09:46 +05:30
Simon Li c521c3c950 Remove constant docker args 2021-07-02 12:42:12 +01:00
Min RK b36a6a75f5 simplify python entrypoint
- remove redundant monitor sibling process
- use python3-login executable instead of login shell subprocess
  (same effect, but in more natural order)
- use non-blocking binary IO in tee instead of readline
  (switch to binary mode, as text wrappers don't support non-blocking mode
   see https://bugs.python.org/issue13322)
2021-03-09 10:45:47 +01:00
Min RK ebf640cb84 implement entrypoint in Python
- make sure to set PYTHONUNBUFFERED
- implement tee with subprocess readlines
- forward all relevant signals from entrypoint to 'true' command
- add monitor process to ensure child shuts down if parent does (maybe not useful in docker?)
2021-02-17 16:13:42 +01:00
Jeremy Tuloup 53a9071e5e Update to node 14 2020-11-20 09:38:44 +01:00
Min RK edfca79371 Remove support for stencila
Changes in stencila mean it doesn't work anymore and it's not feasible to update nbstencilaproxy

Instead, show only a warning about removed support for stencila
2020-11-19 18:17:23 +01:00
Kyungdahm Yun 8f714b48be Ensure REPO_DIR owned by NB_USER 2020-10-18 00:39:49 -07:00
Nicholas Bollweg 778c914c8c use jinja var for COPY chown 2020-10-15 08:58:12 -04:00
Nicholas Bollweg dc559b825a add chown to COPY commands to reduce layer count 2020-10-14 23:18:18 -04:00
Simon Li 2f15586474
Update repo2docker/buildpacks/base.py
Co-Authored-By: Tim Head <betatim@gmail.com>
2019-10-06 11:38:36 +01:00
Simon Li 91b7d752b6 adduser: useradd --no-log-init to reduce lastlog size
If the Docker host does not support sparse files /var/log/lastlog can be extremely large if a large UID is set. --no-log-init prevents lastlog being created.
2019-10-05 23:45:12 +01:00
Min RK 4f428c3055
Merge pull request #681 from Xarthisius/abspath_in_scripts
[MRG] Allow absolute paths in build_script_files. Fixes #673
2019-09-07 12:33:14 +02:00
Min RK 31da8e32b1 run chown as root 2019-07-18 17:55:38 +02:00
Min RK 654be046ac set permissions on repo_dir prior to preassemble 2019-07-18 14:40:08 +02:00
Min RK 5b12e072b1 move stencila to preassemble 2019-07-16 08:35:35 +02:00
Tim Head 09b84811ae Make sure all loops over dict items are deterministic 2019-07-12 07:23:41 +02:00
Tim Head 66227f85b4 Detect failure of pre-assembly in R buildpack
If the pre-assembly step succeeds we do not re-run it after copying the
repository contents.
2019-07-06 16:21:29 +02:00
Kacper Kowalik (Xarthisius) 24234d9365
Allow absolute paths in build_script_files. Fixes #673 2019-06-28 08:44:11 -05:00
Tim Head 10ca25d986 Install APT packages before copying the repo contents 2019-06-25 12:57:54 +02:00
Tim Head 8b004e06dc Apply auto formatting
Apologies to anyone finding this commit via git blame or log

run the autoformatting by

    pre-commit run --all-files
2019-06-03 21:37:25 +02:00
yuvipanda 74fc378230 Clarify comment around memswap & memory 2019-05-08 09:44:58 -07:00
Tim Head 2eb4781c2e Swap limit doesn't have to be bigger than memory limit 2019-05-08 18:22:11 +02:00
Tim Head 032baf6d04 Add check to `build()` for memory limit type 2019-05-08 14:23:43 +02:00
Tim Head ef2860371a Fix memory limits set for container image builds 2019-05-08 08:11:38 +02:00
yuvipanda 4dd32f3563 Make sure ENTRYPOINT is an absolute path
Unlike other parts of the generated Dockerfile,
the start script is evaluated at run time, rather
than at build time. Currently, we assume that the
current working directory is the same at runtime
as build time for the start script. This doesn't
hold true always, and particularly not in JupyterHub
environments where ${HOME} is often overlaid with
a persistent directory.

We change this to always refer to the full path,
using the ${REPO_DIR} environment variable. This
lets people building JupyterHub images to set
REPO_DIR to something like /srv/repo (like hubploy
does), and still have a working start script.
2019-04-30 10:04:53 -07:00
Tim Head 5e67e3c743
Support .binder directory (#653)
Support .binder directory
2019-04-30 18:29:38 +02:00
Tim Head e15007d528 Make sure start script is executable 2019-04-30 08:43:19 +02:00