H
Homarr•2y ago
BerserkeR

New to docker, asking if the docker-compose is correct

version: "3.2" services: # Homarr - https://github.com/ajnart/homarr # mkdir /volume1/docker/appdata/homarr # mkdir /volume1/docker/appdata/configs # mkdir /volume1/docker/appdata/icons homarr: container_name: homarr image: ghcr.io/ajnart/homarr:latest restart: unless-stopped logging: driver: json-file options: max-file: ${DOCKERLOGGING_MAXFILE} max-size: ${DOCKERLOGGING_MAXSIZE} labels: - org.hotio.pullio.update=${PULLIO_UPDATE} - org.hotio.pullio.notify=${PULLIO_NOTIFY} - org.hotio.pullio.discord.webhook=${PULLIO_DISCORD_WEBHOOK} environment: - PUID=${PUID} - PGID=${PGID} - TZ=${TZ} volumes: - ./homarr/configs:/app/data/configs - ./homarr/icons:/app/public/icons ports: - 7575:7575
26 Replies
Manicraft1001
Manicraft1001•2y ago
Hello @berserker._. , the docker compose file can vary on your setup. Thus, I can't verify 100% that this will be working. I just had a quick glance at it and I think that it should be working. Is there a particular reason, why you're asking if this will work? Why don't you just try it out?
BerserkeR
BerserkeR•2y ago
It looked like it didn't put files into the folders but it just did. I wasn't 100% sure if the paths were correct. i was working with a .env file that adds a part of the path to the docker-compose DOCKERSTORAGEDIR=/volume1/nas and DOCKERCONFDIR=/volume1/docker/appdata But i guess that isn't needed when you begin with ./homarr/ Sorry i'm fairly new at this 🙃
Manicraft1001
Manicraft1001•2y ago
No worries Is now Homarr working as expected?
BerserkeR
BerserkeR•2y ago
Sorry for the noob question maybe i should delete the whole thread lol Uhm, i'm gonna try it out now!
Manicraft1001
Manicraft1001•2y ago
No, you can leave it If other people have the same question, they'll see this
BerserkeR
BerserkeR•2y ago
I guess i forgot to add this line? /var/run/docker.sock:/var/run/docker.sock:ro
Manicraft1001
Manicraft1001•2y ago
If you want to use the Docker module, yes
BerserkeR
BerserkeR•2y ago
I'm using a Synology NAS to run this by the way. Should that line always be like this? I'm worried i put things in folders i can't access or something or where they aren't supposed to be. Instead of in my docker shared folder with all the appdata/configs
Manicraft1001
Manicraft1001•2y ago
Usually, /var/run/docker.sock is the default path for the Docker socket, which is used to communicate with Docker itself There are some security risks connected with this approach You can use Docker socket proxies to minimize the security risks
BerserkeR
BerserkeR•2y ago
Okay, yes that's what i thought. It's not like i'm putting files some where where they don't belong or don't get removed when i delete the image or something.. I'm not sure how i do that
Manicraft1001
Manicraft1001•2y ago
No, Homarr will only "read" this file Thus, the ":ro" permission at the end
Manicraft1001
Manicraft1001•2y ago
I think there are multiple solutions to that, but this seems to be a popular one: https://github.com/Tecnativa/docker-socket-proxy
GitHub
GitHub - Tecnativa/docker-socket-proxy: Proxy over your Docker sock...
Proxy over your Docker socket to restrict which requests it accepts - GitHub - Tecnativa/docker-socket-proxy: Proxy over your Docker socket to restrict which requests it accepts
BerserkeR
BerserkeR•2y ago
I do have all docker containers on a specific PUID and PGID limited to only what they should have access to if that helps to a user account called ''docker''
Manicraft1001
Manicraft1001•2y ago
But then, you have to trust the socket proxy... So ultimately, there will always be some security risk involved Yes, that's good practice
BerserkeR
BerserkeR•2y ago
But you would still recommend me to do this? Because i don't fully understand what the security risk is 😄 I'll read a bit on the Github page
Want results from more Discord servers?
Add your server