Commit e594bad
szachovy
Fix image pull overwriting pre-loaded images and missing PYTHONPATH
Two bugs:
1. pull_or_build_image always called client.images.pull() which pulls
from the registry even when the image was already loaded into the
node via docker save | docker load in CI. This overwrote the
locally-built image (containing the /var/log/mysql fix) with the
published GHCR version that lacks it, causing mysql entrypoint to
fail with Permission denied. Fix: check images.get() first and only
pull/build if the image is not already present locally.
2. exec_command over SSH runs in a non-login, non-interactive shell
which does not load ~/.profile or PYTHONPATH, so pip --user packages
at ~/.local/lib/python3.10/site-packages are not found. This caused
ModuleNotFoundError: No module named 'docker' when running
container.py remotely. Fix: prepend PYTHONPATH explicitly.1 parent 9556ef2 commit e594bad
2 files changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
109 | 112 | | |
110 | 113 | | |
111 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| |||
0 commit comments