dev-isolator 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dev_isolator/__init__.py +13 -0
- dev_isolator/__main__.py +15 -0
- dev_isolator/base_image.py +429 -0
- dev_isolator/config.py +650 -0
- dev_isolator/constants.py +58 -0
- dev_isolator/container_image.py +302 -0
- dev_isolator/container_manager.py +516 -0
- dev_isolator/data/Containerfile +32 -0
- dev_isolator/data/addons/addon.claude.jinja2 +16 -0
- dev_isolator/data/addons/addon.opencode.jinja2 +16 -0
- dev_isolator/data/addons/config.claude.yaml +292 -0
- dev_isolator/data/addons/config.opencode.py +4 -0
- dev_isolator/data/addons/config.opencode.yaml +8 -0
- dev_isolator/data/base/Containerfile.almalinux-10 +5 -0
- dev_isolator/data/base/Containerfile.almalinux-9 +5 -0
- dev_isolator/data/base/Containerfile.archlinux +6 -0
- dev_isolator/data/base/Containerfile.debian-13 +6 -0
- dev_isolator/data/base/Containerfile.fedora-43 +5 -0
- dev_isolator/data/base/Containerfile.fedora-44 +5 -0
- dev_isolator/data/base/Containerfile.fedora-45 +5 -0
- dev_isolator/data/base/Containerfile.fedora-rawhide +6 -0
- dev_isolator/data/base/Containerfile.opensuse-leap +4 -0
- dev_isolator/data/base/Containerfile.opensuse-tumbleweed +5 -0
- dev_isolator/data/base/Containerfile.ubuntu-22.04 +6 -0
- dev_isolator/data/base/Containerfile.ubuntu-24.04 +7 -0
- dev_isolator/data/base/Containerfile.ubuntu-26.04 +8 -0
- dev_isolator/data/config.yaml +136 -0
- dev_isolator/data/setup/add_user.containerfile.jinja2 +36 -0
- dev_isolator/main.py +931 -0
- dev_isolator/podman_utils.py +116 -0
- dev_isolator/utils.py +86 -0
- dev_isolator/waitspinner.py +115 -0
- dev_isolator-0.1.0.dist-info/METADATA +131 -0
- dev_isolator-0.1.0.dist-info/RECORD +38 -0
- dev_isolator-0.1.0.dist-info/WHEEL +5 -0
- dev_isolator-0.1.0.dist-info/entry_points.txt +3 -0
- dev_isolator-0.1.0.dist-info/licenses/LICENSE +674 -0
- dev_isolator-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"""Podman helpers shared by the image build and cleanup code.
|
|
2
|
+
|
|
3
|
+
Provides the image id lookup and the removal of images superseded by a
|
|
4
|
+
new build with the same tag, keeping podman free of dangling images.
|
|
5
|
+
|
|
6
|
+
Copyright (C) 2026 Martin Köhler
|
|
7
|
+
|
|
8
|
+
This program comes with ABSOLUTELY NO WARRANTY.
|
|
9
|
+
This is free software, and you are welcome to redistribute it
|
|
10
|
+
under certain conditions; see LICENSE for details.
|
|
11
|
+
SPDX-License-Identifier: GPL-3.0-or-later
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
import podman
|
|
15
|
+
from .utils import dprint, Verbosity
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
from tree_sitter import Language, Parser
|
|
19
|
+
import tree_sitter_containerfile
|
|
20
|
+
import podman.errors
|
|
21
|
+
import podman
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def replace_from_images(content: str, new_image: str) -> str:
|
|
25
|
+
"""Replace the image of every ``FROM`` instruction in a Containerfile.
|
|
26
|
+
|
|
27
|
+
Parses ``content`` with the tree-sitter Containerfile grammar (the
|
|
28
|
+
same grammar used by :meth:`ContainerImage.get_from_image`), finds
|
|
29
|
+
every ``FROM`` instruction's image spec and replaces it with
|
|
30
|
+
``new_image``; tags, digests and ``AS <alias>`` parts of the
|
|
31
|
+
instruction are preserved (only the image itself is replaced, so
|
|
32
|
+
``FROM ubuntu:26.04`` becomes e.g.
|
|
33
|
+
``FROM dev-isolator-ubuntu:26.04-something``).
|
|
34
|
+
|
|
35
|
+
:param content: The Containerfile content to modify.
|
|
36
|
+
:param new_image: The image spec to put in place of each
|
|
37
|
+
``FROM`` instruction's current image.
|
|
38
|
+
:returns: The modified Containerfile content.
|
|
39
|
+
"""
|
|
40
|
+
parser = Parser(
|
|
41
|
+
Language(tree_sitter_containerfile.language())
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
source = content.encode("utf-8")
|
|
45
|
+
tree = parser.parse(source)
|
|
46
|
+
|
|
47
|
+
replacements = []
|
|
48
|
+
|
|
49
|
+
def visit(node):
|
|
50
|
+
"""Collect the byte range of each ``FROM`` image spec."""
|
|
51
|
+
if node.type == "from_instruction":
|
|
52
|
+
for child in node.named_children:
|
|
53
|
+
if child.type == "image_spec":
|
|
54
|
+
replacements.append(
|
|
55
|
+
(child.start_byte, child.end_byte)
|
|
56
|
+
)
|
|
57
|
+
break
|
|
58
|
+
|
|
59
|
+
for child in node.named_children:
|
|
60
|
+
visit(child)
|
|
61
|
+
|
|
62
|
+
visit(tree.root_node)
|
|
63
|
+
|
|
64
|
+
for start, end in reversed(replacements):
|
|
65
|
+
source = (
|
|
66
|
+
source[:start]
|
|
67
|
+
+ new_image.encode("utf-8")
|
|
68
|
+
+ source[end:]
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
return source.decode("utf-8")
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def get_image_id(client, tag):
|
|
75
|
+
"""Return the id of the image tagged ``tag``, or ``None``.
|
|
76
|
+
|
|
77
|
+
:param client: Connected :class:`podman.PodmanClient`.
|
|
78
|
+
:param tag: Name (tag) of the image to look up.
|
|
79
|
+
"""
|
|
80
|
+
try:
|
|
81
|
+
return client.images.get(tag).id
|
|
82
|
+
except (podman.errors.NotFound, podman.errors.ImageNotFound):
|
|
83
|
+
dprint(Verbosity.INFO, f"No existing image {tag}")
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def remove_superseeded_image(client, previous_id, new_id, tag):
|
|
88
|
+
"""Remove the previous image with ``tag``, if the build
|
|
89
|
+
replaced it.
|
|
90
|
+
|
|
91
|
+
When podman applies a build's tag to a new image, the previous
|
|
92
|
+
image loses the tag and remains as a dangling artifact. To
|
|
93
|
+
avoid this, it is removed (by id) after the build - but only
|
|
94
|
+
when the build actually produced a new image id.
|
|
95
|
+
|
|
96
|
+
:param client: Connected :class:`podman.PodmanClient`.
|
|
97
|
+
:param tag: Name (tag) of the image that was built.
|
|
98
|
+
:param previous_id: Id of the image tagged ``tag`` before the
|
|
99
|
+
build, or ``None`` when there was none.
|
|
100
|
+
:param new_id: Id of the image the build produced.
|
|
101
|
+
:raises RuntimeError: if podman refuses to remove the image.
|
|
102
|
+
"""
|
|
103
|
+
if previous_id is None:
|
|
104
|
+
dprint(Verbosity.INFO, f"No previous image {tag} to remove")
|
|
105
|
+
return
|
|
106
|
+
if previous_id == new_id:
|
|
107
|
+
dprint(Verbosity.INFO, f"Image {tag} unchanged "
|
|
108
|
+
f"({previous_id}); not removing")
|
|
109
|
+
return
|
|
110
|
+
dprint(Verbosity.INFO, f"Removing superseded image {tag} "
|
|
111
|
+
f"({previous_id})")
|
|
112
|
+
try:
|
|
113
|
+
client.images.remove(previous_id, force=True)
|
|
114
|
+
dprint(Verbosity.INFO, f"Removed image {tag}")
|
|
115
|
+
except podman.errors.APIError as e:
|
|
116
|
+
raise RuntimeError(f"Failed to remove image {tag}: {e}") from e
|
dev_isolator/utils.py
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
""" Utility functions for dev-isolator
|
|
2
|
+
|
|
3
|
+
Copyright (C) 2026 Martin Köhler
|
|
4
|
+
|
|
5
|
+
This program comes with ABSOLUTELY NO WARRANTY.
|
|
6
|
+
This is free software, and you are welcome to redistribute it
|
|
7
|
+
under certain conditions; see LICENSE for details.
|
|
8
|
+
SPDX-License-Identifier: GPL-3.0-or-later
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
from enum import IntEnum
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Verbosity(IntEnum):
|
|
16
|
+
"""Enum-like verbosity levels used by :func:`set_verbosity`,
|
|
17
|
+
:func:`get_verbosity` and :func:`dprint`.
|
|
18
|
+
|
|
19
|
+
Being an :class:`enum.IntEnum`, members compare against plain
|
|
20
|
+
integers (e.g. the ``--verbose`` repeat count) as usual:
|
|
21
|
+
|
|
22
|
+
>>> Verbosity.DEBUG >= 1
|
|
23
|
+
True
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
ERROR = 0
|
|
27
|
+
INFO = 1
|
|
28
|
+
DEBUG = 2
|
|
29
|
+
TRACE = 3
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# Global verbosity level, controlled via :func:`set_verbosity`.
|
|
33
|
+
VERBOSITY = Verbosity.ERROR
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def set_verbosity(level: Verbosity | int) -> None:
|
|
37
|
+
"""Set the global verbosity level used by :func:`dprint`."""
|
|
38
|
+
global VERBOSITY
|
|
39
|
+
VERBOSITY = Verbosity(level)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def get_verbosity() -> int:
|
|
43
|
+
"""Return the current global verbosity level."""
|
|
44
|
+
return VERBOSITY
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def dprint(level: Verbosity | int, *args, **kwargs) -> None:
|
|
48
|
+
"""Print the message if the global verbosity is >= ``level``.
|
|
49
|
+
|
|
50
|
+
``level`` may be a :class:`Verbosity` member (e.g.
|
|
51
|
+
``Verbosity.DEBUG``) or a plain integer.
|
|
52
|
+
|
|
53
|
+
``args`` and ``kwargs`` are forwarded to :func:`print`, so e.g.
|
|
54
|
+
``file=sys.stderr`` works as usual.
|
|
55
|
+
|
|
56
|
+
The message is prefixed with the level name in brackets, e.g.
|
|
57
|
+
``[ERROR]``, ``[INFO]``, ``[DEBUG]`` or ``[TRACE]``.
|
|
58
|
+
"""
|
|
59
|
+
if VERBOSITY >= level:
|
|
60
|
+
prefix = f"[{Verbosity(level).name}]"
|
|
61
|
+
args = (f"{prefix} {args[0]}", *args[1:]) if args else (prefix,)
|
|
62
|
+
print(*args, **kwargs)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def search_path(pattern):
|
|
66
|
+
"""Search for ``pattern`` upwards from the current directory.
|
|
67
|
+
|
|
68
|
+
Walks up the directory tree starting at the current working
|
|
69
|
+
directory until the home or the filesystem root directory
|
|
70
|
+
(inclusive) and returns the path of the first ``pattern`` found
|
|
71
|
+
in one of those directories.
|
|
72
|
+
|
|
73
|
+
Returns None when the walk reaches the home directory (or the
|
|
74
|
+
filesystem root, for a working directory outside the home tree)
|
|
75
|
+
and the pattern was not found.
|
|
76
|
+
"""
|
|
77
|
+
home = Path.home()
|
|
78
|
+
directory = Path.cwd().resolve()
|
|
79
|
+
|
|
80
|
+
while True:
|
|
81
|
+
candidate = directory / pattern
|
|
82
|
+
if candidate.exists():
|
|
83
|
+
return candidate
|
|
84
|
+
if directory == home or directory.parent == directory:
|
|
85
|
+
return None
|
|
86
|
+
directory = directory.parent
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
""" A small rotating "waiting" animation for dev-isolator
|
|
2
|
+
|
|
3
|
+
Copyright (C) 2026 Martin Köhler
|
|
4
|
+
|
|
5
|
+
This program comes with ABSOLUTELY NO WARRANTY.
|
|
6
|
+
This is free software, and you are welcome to redistribute it
|
|
7
|
+
under certain conditions; see LICENSE for details.
|
|
8
|
+
SPDX-License-Identifier: GPL-3.0-or-later
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import itertools
|
|
12
|
+
import sys
|
|
13
|
+
import threading
|
|
14
|
+
import time
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class WaitSpinner:
|
|
18
|
+
"""Show a small rotating "waiting" animation on a terminal.
|
|
19
|
+
|
|
20
|
+
The spinner runs in a background thread and redraws a single
|
|
21
|
+
terminal line with rotating icons (braille animation frames) and
|
|
22
|
+
the elapsed seconds, so the user can see that something is going
|
|
23
|
+
on while a long operation (e.g. a podman image build) runs.
|
|
24
|
+
|
|
25
|
+
Intended to be used as a context manager::
|
|
26
|
+
|
|
27
|
+
with WaitSpinner("Building image"):
|
|
28
|
+
slow_operation()
|
|
29
|
+
|
|
30
|
+
When the operation finishes, the spinning line is replaced by a
|
|
31
|
+
summary line starting with the ✨ sparkles (operation and total
|
|
32
|
+
duration), so the user sees the operation completed and the cursor
|
|
33
|
+
ends up on a clean line for subsequent output.
|
|
34
|
+
|
|
35
|
+
The animation is only drawn when stdout is a terminal; in scripts,
|
|
36
|
+
log files or pipes (``isatty() == False``) nothing is animated -
|
|
37
|
+
the context manager then just measures the elapsed time silently.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
#: Rotating icons (braille spinner frames).
|
|
41
|
+
FRAMES = ("⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏")
|
|
42
|
+
|
|
43
|
+
#: Seconds between icon changes.
|
|
44
|
+
INTERVAL = 0.1
|
|
45
|
+
|
|
46
|
+
def __init__(self, message: str = "Waiting", final: str = "done"):
|
|
47
|
+
"""Prepare, but do not yet start, the animation.
|
|
48
|
+
|
|
49
|
+
``message`` is the text shown (and later summarized) next to
|
|
50
|
+
the rotating icons, e.g. ``"Building image"``.
|
|
51
|
+
"""
|
|
52
|
+
self._message = message.strip().rstrip(".")
|
|
53
|
+
self._final = final.strip().rstrip(".")
|
|
54
|
+
self._stop_event = threading.Event()
|
|
55
|
+
self._thread: threading.Thread | None = None
|
|
56
|
+
self._animate = False
|
|
57
|
+
self._line_len = 0
|
|
58
|
+
self._add_text = ""
|
|
59
|
+
|
|
60
|
+
def set_text(self, text: str):
|
|
61
|
+
self._add_text = text
|
|
62
|
+
|
|
63
|
+
def _run(self) -> None:
|
|
64
|
+
"""Animate the spinner until :meth:`__exit__` stops it."""
|
|
65
|
+
stream = sys.stdout
|
|
66
|
+
frames = itertools.cycle(self.FRAMES)
|
|
67
|
+
start = time.monotonic()
|
|
68
|
+
while not self._stop_event.wait(self.INTERVAL):
|
|
69
|
+
elapsed = time.monotonic() - start
|
|
70
|
+
line = f"{next(frames)} {self._message} ... {elapsed:4.0f}s"
|
|
71
|
+
stream.write("\r" + line)
|
|
72
|
+
stream.flush()
|
|
73
|
+
self._line_len = max(self._line_len, len(line))
|
|
74
|
+
|
|
75
|
+
def __enter__(self) -> "WaitSpinner":
|
|
76
|
+
"""Start the animation and return ``self``.
|
|
77
|
+
|
|
78
|
+
Records the start time for the final summary and enables the
|
|
79
|
+
animation accordingly (only when stdout is a terminal).
|
|
80
|
+
"""
|
|
81
|
+
self._started = time.monotonic()
|
|
82
|
+
self._animate = sys.stdout.isatty()
|
|
83
|
+
if self._animate:
|
|
84
|
+
self._thread = threading.Thread(target=self._run, daemon=True)
|
|
85
|
+
self._thread.start()
|
|
86
|
+
return self
|
|
87
|
+
|
|
88
|
+
def __exit__(self, exc_type, exc, tb) -> None:
|
|
89
|
+
"""Stop the animation and finish the spinner line.
|
|
90
|
+
|
|
91
|
+
Without an exception, ``__exit__`` replaces the spinning line
|
|
92
|
+
with the ✨ summary line (or prints one when not animating).
|
|
93
|
+
With an exception, the spinning line is erased, so the
|
|
94
|
+
context manager never masks the exception's own error
|
|
95
|
+
output.
|
|
96
|
+
"""
|
|
97
|
+
self._stop_event.set()
|
|
98
|
+
if self._thread is not None:
|
|
99
|
+
self._thread.join()
|
|
100
|
+
if exc_type is None:
|
|
101
|
+
summary = f"✨ {self._message} {self._final} done in " \
|
|
102
|
+
f"{time.monotonic() - self._started:.1f}s " \
|
|
103
|
+
f"{self._add_text}"
|
|
104
|
+
if self._animate:
|
|
105
|
+
# Overwrite the spinning line with the ready emoticon.
|
|
106
|
+
stream = sys.stdout
|
|
107
|
+
stream.write("\r" + summary
|
|
108
|
+
+ " " * max(0, self._line_len - len(summary))
|
|
109
|
+
+ "\n")
|
|
110
|
+
else:
|
|
111
|
+
print(summary)
|
|
112
|
+
elif self._animate:
|
|
113
|
+
stream = sys.stdout
|
|
114
|
+
stream.write("\r" + " " * self._line_len + "\r")
|
|
115
|
+
stream.flush()
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dev-isolator
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Podman-based per-project development environment manager
|
|
5
|
+
License-Expression: GPL-3.0-or-later
|
|
6
|
+
Project-URL: Homepage, https://gitlab.mpi-magdeburg.mpg.de/software/dev-isolator
|
|
7
|
+
Project-URL: Issues, https://gitlab.mpi-magdeburg.mpg.de/software/dev-isolator/-/work_items
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: podman
|
|
12
|
+
Requires-Dist: pyyaml
|
|
13
|
+
Requires-Dist: jinja2
|
|
14
|
+
Requires-Dist: tree-sitter
|
|
15
|
+
Requires-Dist: tree-sitter-containerfile
|
|
16
|
+
Provides-Extra: dev
|
|
17
|
+
Requires-Dist: pytest; extra == "dev"
|
|
18
|
+
Dynamic: license-file
|
|
19
|
+
|
|
20
|
+
# dev-isolator
|
|
21
|
+
|
|
22
|
+
`dev-isolator` is a command line tool that manages a per-project,
|
|
23
|
+
[podman](https://podman.io/) based development environment.
|
|
24
|
+
|
|
25
|
+
## Licensing
|
|
26
|
+
|
|
27
|
+
Copyright (C) 2026 Martin Köhler
|
|
28
|
+
|
|
29
|
+
`dev-isolator` is free software: you can redistribute it and/or modify it under
|
|
30
|
+
the terms of the GNU General Public License as published by the Free Software
|
|
31
|
+
Foundation, either version 3 of the License, or (at your option) any later
|
|
32
|
+
version (GPL-3.0-or-later).
|
|
33
|
+
|
|
34
|
+
See [LICENSE](LICENSE) for details.
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
Before using `dev-isolator`, [podman](https://podman.io/) must be installed and
|
|
39
|
+
enabled as a user service, typically with:
|
|
40
|
+
|
|
41
|
+
```shell
|
|
42
|
+
systemctl --user enable --now podman.service
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The recommended way to install `dev-isolator` is [`pipx`](https://pipx.pypa.io/stable/),
|
|
46
|
+
which runs the CLI in an isolated virtual environment without touching your main Python
|
|
47
|
+
environment:
|
|
48
|
+
```bash
|
|
49
|
+
pipx install dev-isolator
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Alternatively, one can use `pip`:
|
|
53
|
+
```bash
|
|
54
|
+
pip install dev-isolator
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Both `dev-isolator` and `di` end up on your `PATH` this way.
|
|
58
|
+
|
|
59
|
+
Run the test suite with `pytest`.
|
|
60
|
+
|
|
61
|
+
### Requirements
|
|
62
|
+
|
|
63
|
+
- Linux with a working podman installation.
|
|
64
|
+
- Python 3.10 or later.
|
|
65
|
+
- Python dependencies:
|
|
66
|
+
- [`podman`](https://podman-py.readthedocs.io/en/latest/)
|
|
67
|
+
- [`pyyaml`](https://pypi.org/project/PyYAML/)
|
|
68
|
+
- [`jinja2`](https://jinja.palletsprojects.com/en/stable/)
|
|
69
|
+
- [`tree-sitter`](https://github.com/tree-sitter/tree-sitter) and
|
|
70
|
+
[`tree-sitter-containerfile`](https://github.com/wharflab/tree-sitter-containerfile/)
|
|
71
|
+
- [`pytest`](https://docs.pytest.org/en/stable/), only used by the test-suite
|
|
72
|
+
(but currently installed with dev-isolator as a regular dependency)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## Quickstart
|
|
76
|
+
|
|
77
|
+
Using the default config just change to the workspace of your project and
|
|
78
|
+
run
|
|
79
|
+
```bash
|
|
80
|
+
di
|
|
81
|
+
```
|
|
82
|
+
After the images are built, you get a shell in an isolated Ubuntu 26.04
|
|
83
|
+
environment, with a minimal developement and Python toolset installed. Your
|
|
84
|
+
current directory is available in `/workspace`.
|
|
85
|
+
|
|
86
|
+
If you want to run [Opencode](https://opencode.ai/) in the current directory, just run
|
|
87
|
+
```bash
|
|
88
|
+
di opencode
|
|
89
|
+
```
|
|
90
|
+
and it sets up an Opencode session in the current directory, but isolated from
|
|
91
|
+
your host. In addition to the current working directory, it gets access your
|
|
92
|
+
Opencode configuration from `~/.config/opencode`.
|
|
93
|
+
|
|
94
|
+
In the same way, running
|
|
95
|
+
```
|
|
96
|
+
di claude
|
|
97
|
+
```
|
|
98
|
+
gives you access to the Claude CLI agent.
|
|
99
|
+
|
|
100
|
+
### Customizing the Environemnt
|
|
101
|
+
|
|
102
|
+
If you need to environment, e.g. using `ubuntu:24.04` instead of `ubuntu:26.04`
|
|
103
|
+
you can initialize your own project configuration using
|
|
104
|
+
```bash
|
|
105
|
+
di init -b ubuntu:24.04
|
|
106
|
+
```
|
|
107
|
+
and edit `.devisolator/Containerfile` to your needs. Afterwards, running
|
|
108
|
+
```bash
|
|
109
|
+
di
|
|
110
|
+
```
|
|
111
|
+
will rebuild your container.
|
|
112
|
+
|
|
113
|
+
Futher options and usage information are available in the [documentation](#documentation)
|
|
114
|
+
|
|
115
|
+
## Documentation
|
|
116
|
+
|
|
117
|
+
Further documentation lives in the `docs/` directory:
|
|
118
|
+
|
|
119
|
+
- [Usage](./docs/usage.md) — subcommands and command line options
|
|
120
|
+
- [Sub-configurations (`--config`)](./docs/sub-configurations.md)
|
|
121
|
+
- [Project configuration](./docs/project-configuration.md)
|
|
122
|
+
- [Base images](./docs/base-images.md)
|
|
123
|
+
- [Examples: a `.devisolator` folder](./docs/examples.md)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## Contributing
|
|
127
|
+
|
|
128
|
+
Contributions are welcome from everyone; please follow the guide in
|
|
129
|
+
[CONTRIBUTING.md](CONTRIBUTING.md).
|
|
130
|
+
|
|
131
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
dev_isolator/__init__.py,sha256=zLFBiIuOwML4_l20-b81lQs4_oEZ8iA1_X8jfJgFopw,352
|
|
2
|
+
dev_isolator/__main__.py,sha256=Woxe5RYNW_ALdPGmyXg2UIpUB0cQ4JszeAFxPC2kK5w,380
|
|
3
|
+
dev_isolator/base_image.py,sha256=yEo2b5eNO6L_LDinwdbeGnXSi4cKi8AahDVb_CWBeCw,17651
|
|
4
|
+
dev_isolator/config.py,sha256=fnzZSzJtH8dKapL_s8KYQujo64nhkNaDFf4dkM2reyw,28512
|
|
5
|
+
dev_isolator/constants.py,sha256=2clziNNoHzh1SmivUDWlveJ4Ggd8n1-T0FSrbtwLuNA,2004
|
|
6
|
+
dev_isolator/container_image.py,sha256=xD2MYoNJPx4A_3Iw62DHO-PAVHEWIxp1FZESu11_nnE,12971
|
|
7
|
+
dev_isolator/container_manager.py,sha256=GhrwpK2jFrXFHSbJp21QtR873XxHzeHX2cqoCByHR48,22346
|
|
8
|
+
dev_isolator/main.py,sha256=9S3HWByRJFZns1UNzU9UngdWCv_BR1cZ1EY9UByder0,36454
|
|
9
|
+
dev_isolator/podman_utils.py,sha256=IGrXhRSApwFuOWebtIXFR-MZP7kjqsmL93DvIPDPFOc,4002
|
|
10
|
+
dev_isolator/utils.py,sha256=CtlH6KmJ3Tj22Wb5tBCiQOAYgtFVAhqZ9VbU9wBCADY,2522
|
|
11
|
+
dev_isolator/waitspinner.py,sha256=pb6C0Wyit1Qsu621xq6HbHZx4JnUo3QDZVL1g467ipg,4306
|
|
12
|
+
dev_isolator/data/Containerfile,sha256=FpUGcXS3ZHxCIM0Hch_v5Ys2LJbf-NNWxhy77ZJoTWU,848
|
|
13
|
+
dev_isolator/data/config.yaml,sha256=xtDTcMjLUDej3vLgElKCa0_zxhcrdoO4xib_ZtDzppc,4295
|
|
14
|
+
dev_isolator/data/addons/addon.claude.jinja2,sha256=NTi9UYMYUIM2F3UbVNpDew4EGPwuHNPeteHw5RVbq9U,498
|
|
15
|
+
dev_isolator/data/addons/addon.opencode.jinja2,sha256=h7vdVmxdJVmauRAVuXJ6vkVyPmDYUScDgA_hr6aicYk,587
|
|
16
|
+
dev_isolator/data/addons/config.claude.yaml,sha256=p7-yA1bElgjRYnkfE1Ux55P8jgFr4QDGC1HForlN5DE,9832
|
|
17
|
+
dev_isolator/data/addons/config.opencode.py,sha256=stRroKANRNekFo_xg-y4Qu290AfWCIOdkITWyO2ldtQ,82
|
|
18
|
+
dev_isolator/data/addons/config.opencode.yaml,sha256=g2ZWWTNA1HpEMZj_LFhsCdmaGp103Yzl6MkL1v5Vc60,290
|
|
19
|
+
dev_isolator/data/base/Containerfile.almalinux-10,sha256=Z3_UYBP2fiKtfUr78US8gBWAYLh59WPWPD3MooRZ1Mc,101
|
|
20
|
+
dev_isolator/data/base/Containerfile.almalinux-9,sha256=qbw3k1HIDJ6ON90TFyPNE4r9dFYUaXsPpCI99kGlTLI,99
|
|
21
|
+
dev_isolator/data/base/Containerfile.archlinux,sha256=pUAFDmJveOOdwfieIyT7kHrsN-1Givl_dipRcAztbUY,112
|
|
22
|
+
dev_isolator/data/base/Containerfile.debian-13,sha256=manL_W5dgDMC-OXwf6_kvqQKhh7e0kzM3Bb50_2HiRI,181
|
|
23
|
+
dev_isolator/data/base/Containerfile.fedora-43,sha256=rCR4r5JZVx3daaCogRVxdi2ym35ffKdBeEaiIgtE_KA,82
|
|
24
|
+
dev_isolator/data/base/Containerfile.fedora-44,sha256=hLT4TvqN73COUTXRDxcagQW-apCCicK9zplaBcHGgyY,82
|
|
25
|
+
dev_isolator/data/base/Containerfile.fedora-45,sha256=Z9b3M5HUGj3iaLll30tnetYRHiMVdFJMfLqHAx1cOvs,82
|
|
26
|
+
dev_isolator/data/base/Containerfile.fedora-rawhide,sha256=KVsyuPpvgANnfOSZL9gmeusmN0nxrskatlaY24-mEpM,107
|
|
27
|
+
dev_isolator/data/base/Containerfile.opensuse-leap,sha256=n-CVs-o_kOeSJYRdFdLq8VAPwsZVMnmCFc-1OU3PPYk,160
|
|
28
|
+
dev_isolator/data/base/Containerfile.opensuse-tumbleweed,sha256=AZvTG_iNZchQ02n-UwEggvhEtDfGycA-dRPFU-zSpWY,194
|
|
29
|
+
dev_isolator/data/base/Containerfile.ubuntu-22.04,sha256=44HinEX5xLodEtuU-UuKMONnzuRjJmxS1GB0Eo2QjvQ,186
|
|
30
|
+
dev_isolator/data/base/Containerfile.ubuntu-24.04,sha256=DMw6MFWfZAA2_i4zaIMEnnXhXvXyCbD6_GpabbjLz08,187
|
|
31
|
+
dev_isolator/data/base/Containerfile.ubuntu-26.04,sha256=is3EbYid52r5IMN21VIF_TwDkdLxzLVSufr9JKYuk2c,205
|
|
32
|
+
dev_isolator/data/setup/add_user.containerfile.jinja2,sha256=k_wSj4TMc2BUKT1M_YTeZGx8p1cbwiN91QPnYUGgIK4,1361
|
|
33
|
+
dev_isolator-0.1.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
34
|
+
dev_isolator-0.1.0.dist-info/METADATA,sha256=edp9EgJv_T3keUPzhE0xbuQMWthb0d8wLPpQHKuvy-A,3949
|
|
35
|
+
dev_isolator-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
36
|
+
dev_isolator-0.1.0.dist-info/entry_points.txt,sha256=6flXNaj22JaxZggr7h7sIKrakG4GHpGybmmLqsXf2ug,84
|
|
37
|
+
dev_isolator-0.1.0.dist-info/top_level.txt,sha256=9JV3wuifvMRDv943He06ULOlkLUkGvXOv55hYuhITaE,13
|
|
38
|
+
dev_isolator-0.1.0.dist-info/RECORD,,
|