How to edit theme style in docker?

~# docker exec -it 9f3678b6218f /bin/bash OCI runtime exec failed: exec failed: unable to start container process: exec: “/bin/bash”: stat /bin/bash: no such file or directory: unknown

How can this be solved?

    • aihaoOP
      link
      fedilink
      arrow-up
      2
      ·
      3 years ago

      i installed Lemmy with Docker, And the site is normal. The documentation says " save your theme file to ./volumes/lemmy-ui/extra_themes.”

      I didn’t find this “. /volumes/lemmy-ui/extra_themes”, there are only these three files volumes, docker-compose.yml, lemmy.hjson in /lemmy/.

      • nutomicA
        link
        fedilink
        arrow-up
        3
        ·
        3 years ago

        The path is /lemmy/volumes/lemmy-ui/extra_themes (if it doesnt exist, create it).

    • aihaoOP
      link
      fedilink
      arrow-up
      1
      ·
      3 years ago

      What I mean is to use the command docker exec -it 9f3678b6218f /bin/bash to enter the Docker instance and then modify the theme file.

      • nutomicA
        link
        fedilink
        arrow-up
        1
        ·
        3 years ago

        Try docker-compose exec lemmy-ui sh, the container might not have bash. Also, any changes made this way will be gone after restart.

        • aihaoOP
          link
          fedilink
          arrow-up
          1
          ·
          3 years ago

          I want to map the /app/dist/assets/css/themes directory in the container to the host lemmy directory. Thereby, the theme file in the container can be modified on the host machine. Added the following code in docker-compose.yml:

           volumes:
             - ./volumes/lemmy-ui:/app/dist/assets/css/themes
          

          After running the instance, no files appear in the host lemmy/volumes/lemmy-ui directory.

          So, what should I do to map the /app/dist/assets/css/themes directory in the container to the host lemmy directory? ? ?

        • aihaoOP
          link
          fedilink
          arrow-up
          1
          ·
          3 years ago

          sudo docker exec -it postgres psql -U postgres ? Not correct?

          • nutomicA
            link
            fedilink
            arrow-up
            1
            ·
            3 years ago

            Dont know, you will see if it works or not. I always use the docker-compose commands.

            • aihaoOP
              link
              fedilink
              arrow-up
              1
              ·
              3 years ago

              What is the docker-compose command?

              • nutomicA
                link
                fedilink
                arrow-up
                1
                ·
                3 years ago

                docker-compose exec postgres psql -U lemmy

                • aihaoOP
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  edit-2
                  3 years ago

                  I change the database name to lemmyok in docker-compose.yml and lemmy.hjson, and use the command “docker-compose exec postgres psql -U lemmyok” and get " psql: error: FATAL: role “lemmyok” does not exist ",can’t enter PG.

                  If I use the command docker-compose exec postgres psql -U lemmy without changing the database name, I can enter PG normally.

                  Am I doing something wrong?

                  What should be the correct solution?