fix: resolve BW state sync issue -- add sync() to login lifecycle
The provisioner's BitwardenHelper.login() was missing the critical `bw sync` step that the host wrapper includes. Without syncing after login, the container's local vault cache was empty/stale, causing items to vanish between container runs. Added sync() call at end of login() and before list_items(). Also fixed container UID/GID to match host user (1002:1002) for proper bind-mount access, and added source-code volume mounts for fast iteration. Verified with 5-phase cross-container persistence test (create in container A, verify in fresh container B, update in C, confirm in D).
This commit is contained in:
+2
-2
@@ -23,8 +23,8 @@ RUN wget -q -O /tmp/bw.zip \
|
||||
COPY requirements.txt /tmp/
|
||||
RUN python3 -m pip install --no-cache-dir --break-system-packages -r /tmp/requirements.txt
|
||||
|
||||
# Create non-root user for Playwright
|
||||
RUN groupadd -r provision && useradd -r -g provision -G audio,video -m -d /home/provision provision \
|
||||
# Create non-root user for Playwright, matching host UID/GID for bind-mount access
|
||||
RUN groupadd -r -g 1002 provision && useradd -r -u 1002 -g provision -G audio,video -m -d /home/provision provision \
|
||||
&& mkdir -p "/home/provision/.config/Bitwarden CLI" \
|
||||
&& chown -R provision:provision /home/provision
|
||||
|
||||
|
||||
Reference in New Issue
Block a user