You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The Docker socket mount grants significant privileges. The container can control other containers.
230
225
- Use read-only deploy keys in your git repository
231
226
- Consider running the sidecar with `--read-only` filesystem (with tmpfs for `/tmp`)
232
-
- SSH keys should be stored in a named volume or secrets manager
227
+
- SSH keys should be stored securely
233
228
234
-
## UID/GID Remapping
229
+
## UID/GID Auto-Detection
235
230
236
-
The container uses [fixuid](https://github.com/boxboat/fixuid) to automatically remap the internal user's UID/GID to match yours at runtime. This ensures files created in bind-mounted directories are owned by your host user.
231
+
The container automatically detects the UID/GID of your bind-mounted directories and runs as that user. This means files created by the container will be owned by your host user without any manual configuration.
237
232
238
233
**How it works:**
239
-
1. You specify `user: "${UID}:${GID}"` in docker-compose (or `-u "$(id -u):$(id -g)"` on command line)
240
-
2. fixuid runs at container startup and remaps the `linesync` user to match
241
-
3. All file operations use your host UID/GID
234
+
1. Container starts as root
235
+
2. Entrypoint detects the owner of mounted directories (e.g., `./linesync-ssh`)
236
+
3. Modifies the internal `linesync` user to match that UID/GID
237
+
4. Drops privileges and runs the actual command as that user
242
238
243
-
**Without UID/GID mapping:** Files would be owned by UID 1234 (the container's default), causing permission issues.
239
+
This happens automatically - no `-u` flags or environment variables needed.
244
240
245
241
## Troubleshooting
246
242
@@ -259,19 +255,9 @@ Run `setup` mode first to clone the repository.
259
255
### "Could not signal container"
260
256
Ensure the Docker socket is mounted and the container name matches `NEFARIOUS_CONTAINER`.
0 commit comments