Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

implement ch-image modify #1408

Merged
merged 71 commits into from
Jul 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
e8b04c9
draft docs [skip ci]
reidpr Jul 9, 2022
2e1da45
attempt to merge
lucaudill Feb 14, 2024
83beda8
add proper formatting [skip ci]
lucaudill Feb 14, 2024
244d174
interactive modify [skip ci]
lucaudill Feb 26, 2024
1ae7c94
Merge branch 'master' into modify_1400
lucaudill Feb 26, 2024
580b6ec
move modify function, other additions (buggy) [skip ci]
lucaudill Mar 14, 2024
e843576
clean stuff up a bit?
lucaudill Mar 19, 2024
d05460e
add (prototype) completion [skip ci]
lucaudill Mar 19, 2024
1df874f
don't enforce different out image [skip ci]
lucaudill Mar 28, 2024
50f917f
standardize ch-run exit codes, make sure out image is different than …
lucaudill Apr 4, 2024
2f43bc9
fix a bug?
lucaudill Apr 4, 2024
491ce01
update some return codes in CI
lucaudill Apr 4, 2024
6f8014e
update test suite
lucaudill Apr 22, 2024
4996b4e
update more exit statuses
lucaudill Apr 22, 2024
feee043
Merge branch 'master' into modify_1400
lucaudill Apr 22, 2024
e641935
wtf
lucaudill Apr 23, 2024
a0867d4
Merge branch 'modify_1400' of github.com:hpc/charliecloud into modify…
lucaudill Apr 23, 2024
151592f
enable CI ssh
lucaudill Apr 24, 2024
e0bc574
run ci
lucaudill Apr 24, 2024
7d6f66e
oops
lucaudill Apr 24, 2024
2c8b2f7
CI debugging
lucaudill Apr 25, 2024
731cfe8
CI debugging again
lucaudill Apr 25, 2024
fd45f64
CI debugging again pt 2
lucaudill Apr 25, 2024
05dac9b
fix a CI bug
lucaudill Apr 25, 2024
00e2ec6
more ci
lucaudill Apr 25, 2024
de7d63c
uggh
lucaudill Apr 25, 2024
f7b87e5
lets try this
lucaudill Apr 25, 2024
4b84644
fix disabled cache bug
lucaudill Apr 25, 2024
1afc853
update docs [skip ci]
lucaudill Apr 26, 2024
c6ae8a9
weird docker message?
lucaudill Apr 29, 2024
4e61c06
some cleanup [skip ci]
lucaudill Apr 30, 2024
9d74d19
put CI exit statuses in one place
lucaudill May 1, 2024
579ec81
ignore seemingly erroneous SC error
lucaudill May 2, 2024
b37232b
update exit codes and docs
lucaudill May 2, 2024
3742a28
oops 🤦
lucaudill May 6, 2024
6e0ff69
tidy docs [skip ci]
reidpr May 10, 2024
26ce9e6
work on suggestions
lucaudill May 21, 2024
dbbf74d
more work on non-interactive script case
lucaudill Jun 4, 2024
8cb7975
try to debug CI
lucaudill Jun 4, 2024
b859089
hopefully this works
lucaudill Jun 5, 2024
54c2ee8
back to how it used to work?
lucaudill Jun 5, 2024
bb0283e
more interactive shell troubles
lucaudill Jun 5, 2024
6bc35a9
skip mysteriously failing test for now
lucaudill Jun 6, 2024
8a97d8d
work on some suggestions
lucaudill Jun 7, 2024
5be8c3e
more RPM issues?
lucaudill Jun 7, 2024
c53a820
oops, misread failure
lucaudill Jun 7, 2024
1dcbb4d
what happens when I do this
lucaudill Jun 7, 2024
3314546
try removing hidden ci opt
lucaudill Jun 10, 2024
6ec4b26
fully remove automated ci option
lucaudill Jun 10, 2024
b6da358
hopefully this also works in CI
lucaudill Jun 10, 2024
2b96ecc
fix syntax error
lucaudill Jun 10, 2024
ed46d89
check for empty string instead of None
lucaudill Jun 10, 2024
fc5c89a
update comment [skip ci]
lucaudill Jun 11, 2024
a9b1e23
Merge branch 'master' into modify_1400
lucaudill Jun 21, 2024
dc5ed4d
fix interactive case
lucaudill Jun 21, 2024
1593009
Merge branch 'modify_1400' of github.com:hpc/charliecloud into modify…
lucaudill Jun 21, 2024
7c320e7
create new Python module
lucaudill Jul 5, 2024
d3b06fb
add new module to makefile
lucaudill Jul 5, 2024
ce2a620
update fedora spec
lucaudill Jul 5, 2024
7f17900
a few minor suggestions
lucaudill Jul 5, 2024
8d0befc
more suggestions, move some build cli stuff around
lucaudill Jul 15, 2024
1b65df9
fix CI tty error
lucaudill Jul 15, 2024
d4f90f3
add cache validation test
lucaudill Jul 15, 2024
09f78f2
add cache validation for interactive modify
lucaudill Jul 16, 2024
681a39c
more suggestions
lucaudill Jul 18, 2024
2cd6149
fix CI
lucaudill Jul 18, 2024
20e2d91
even more suggestions
lucaudill Jul 19, 2024
32efbe4
couple more suggestions
lucaudill Jul 23, 2024
f4b1ba7
docs + comments
lucaudill Jul 24, 2024
62fe3e2
comment on log level stuff
lucaudill Jul 24, 2024
621b19a
some cleanup
lucaudill Jul 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
draft docs [skip ci]
reidpr committed Jul 9, 2022
commit e8b04c9739230ed5ba6ad684496c38c3b3c80f5b
74 changes: 74 additions & 0 deletions doc/ch-image_desc.rst
Original file line number Diff line number Diff line change
@@ -856,6 +856,80 @@ functionally identical when re-imported.
already been imported.


:code:`modify`
==============

Interactively edit the specified image.

Synopsis
--------

::

$ ch-image [...] modify [...] TARGET

Description
-----------

This subcommand starts a shell on the image named :code:`TARGET`, in order to
edit the image interactively. It is similar to a :code:`RUN` instruction that
starts an interactive shell. By default, ask the user whether to save changes
when the shell exits.

Options:

:code:`-m MSG`
Use :code:`MSG` to identify the edits to the build cache. That is, if you
run this command twice with the same :code:`TARGET`, the same :code:`-o
DEST`, and the same :code:`MSG`, the second session will overwrite the
first. (Without :code:`-o`, the second session will build atop the first.)
By default, every interactive session is considered different from every
other, as if a random :code:`MSG` were entered.

:code:`-o`, :code:`--out DEST`
Save the results in image named :code:`DEST`, leaving :code:`TARGET`
unchanged.

:code:`-s`, :code:`--shell SHELL`
Start :code:`SHELL` instead of :code:`/bin/sh`.

:code:`-y`, :code:`--yes`
Do not prompt the user to save. Instead, save if the shell exits
successfully, and roll back if it exits unsuccessfully, e.g. by executing
:code:`exit 1`.

.. warning::

This subcommand is rarely needed. Non-interactive build using a Dockerfile
is almost always better, because it preserves the sequence of operations
that created an image. Only use this subcommand if you really know what you
are doing.

Examples
--------

To edit the image :code:`foo`, adding :code:`/opt/lib` to the default shared
library search path, producing image :code:`bar` as the result::

$ ch-image modify -o bar foo
[...]
> emacs /etc/ld.so.conf
[... append line “/opt/lib” to the file ...]
> ldconfig
> exit
Save changes ([y]/n)? y
committing ...
[...]

Equivalently, and almost certainly preferred::

$ cat Dockerfile
FROM foo
RUN echo /opt/lib >> /etc/ld.so.conf
RUN ldconfig
$ ch-image build -t bar -f Dockerfile .


:code:`pull`
============