11
submitted 5 months ago* (last edited 5 months ago) by early_riser@lemmy.world to c/linux4noobs@lemmy.world

There's a lot I don't understand about both docker and git, so my question and description of the problem may not be as detailed as some would like.

I've set up a container, Otter wiki, via the docker compose file offered in the docs. This sets up a persistent volume outside the container where the wiki config and git repo containing the wiki's pages live. Everything works fine. I can go to the site and everything works. But I want to add external files to the repo. When I try to do it, it throws an error saying I need to enter my email and user name. I do this, and it still says permission denied.

I assume the instance of git that's tracking the repo lives inside the docker container, but the repo itself lives outside the container. How do I add and commit files?

CLARIFYING EDIT:

The repo I'm trying to use isn't for Otter's source code. Otter uses git as the revision tracking system component common to most wikis. That is, the wiki itself is a git repo filled with markdown files. In order to add a bunch of existing markdown files to the wiki, I have to tell git to track them, but this is a persistent volume outside the container, so the instance of git I'm using is on the host, but the instance of git that's tracking the files is in the container.

all 12 comments
sorted by: hot top new old
[-] j4k3@lemmy.world 1 points 5 months ago* (last edited 5 months ago)

The stuff outside is likely exported from the container, but is likely just a link to what is inside, made to look transparent from the host but is not real.

Containers create an overlay layer on top of the host. Some stuff on the host may still be linked directly.

The abstract concept to understand here is that the thing you want to put in a container is likely to need outdated or different library (code) dependencies than the host machine. If you installed this software on the host, the conflicting dependencies are a nightmare and are likely to break stuff over time. So the container is the solution. It is as likely to be as small of an overlay image as possible and contains the dependencies that would otherwise conflict, and keeps them separate from the host.

If you want to work with these, you must log into the container, and use the tools within. This will likely involve both the container and a Python venv layer, conda, or uv.

It is also likely that docker is just an alias for podman on a Linux machine.

[-] tofu@lemmy.nocturnal.garden 1 points 5 months ago

The repo should just be some files, not actively "managed" from inside or outside the container. Interfering from outside might still cause some confusion.

I assume the volume is created in /var/lib/docker/volumes. What's the error once you configured username and email?

If you can't get it to work from outside, you can "log into" the running docker container with docker exec -ti CONTAINERID /bin/sh.

[-] folekaule@lemmy.world 1 points 5 months ago* (last edited 5 months ago)

I don't know the specifics of your app, but Docker containers aren't designed to be used for persistent data. They are designed to be immutable after they're built.

Instead you would create a volume to keep files in and mount them where your application needs them. Typically like /data or /var/something. (Edit: otter wiki wants /app-data)

You can use a bind mount to mount a local directory or a named volume which is kept in a set location by Docker. Generally bind mounts are easier to start with since you can browse the files directly on the host.

this post was submitted on 04 Apr 2026
11 points (92.3% liked)

Linux 101 stuff. Questions are encouraged, noobs are welcome!

1518 readers
1 users here now

Linux introductions, tips and tutorials. Questions are encouraged. Any distro, any platform! Explicitly noob-friendly.

founded 3 years ago
MODERATORS