I’m having some problems installing Vaultwarden and I wonder if it because I’m running docker compose in the wrong way and there are user permission issues.

What is the right way of installing docker compose (on a linux VM)? In in the past I would create a docker folder /home/user/docker. In there I would create the folder firefly or whatever and then I would run docker compose as user. So, when installing firefly, I would be in the /home/user/docker/firefly and run docker compose from within. Not as root (using sudo) but as a the normal user user. Firefly service would just run without problmes. Shoudl I be installing containers this way of shoudl I be using root (sudo)?

  • Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    6 months ago

    that is fine, the only requirement AFAIK is the user being in the docker group in case you’re having permission issues running it as user

    • trilobite@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      6 months ago

      Of course, i forgot to mention, that user is in the docker grp. I was just thinking that maybe, as the data folders/volumes for the containers were saved in the user home directory, there may be read/write issues foe the various containers.

      Likewise, i was worried that if installing/running a sensitive service like Vaultwarden with sudo exposed me to risks.

    • erebion@news.erebion.eu
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 months ago

      Also, keep in mind that the docker group effectively grants root access.

      The account can then mount any file or directory into a container and do whatever it wants.

  • PotatoesFall@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    6 months ago

    I don’t understand the question tbh. Make a docker-compose.yml in some folder, and then run your docker compose commands in that folder. Does that result in error and if so what errors?

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    6 months ago

    Compose is just a single binary. There is no wrong way to install it really as long as it can find all the needed shared libraries and such.

    If in doubt, look at the manual install instructions. Run through that, and see if it behaves any differently.

    Some logs from the startup of a this container would help. Just run docker compose up (without the -d) and you’ll get all the output up front.

  • chonkyninja@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    16
    ·
    6 months ago

    Or you know, move on to newer better tools that even docker uses internally instead of this limpdick unsupported tool.

    Use kind, and kubernetes resources. You can literally use ‘kompose’ to convert your compose config, and then apply it to a local kind cluster.