• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

Trying to install into docker, but getting permission error.

Scheduled Pinned Locked Moved
General Discussion
0
6
4.5k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X
    xan
    last edited by 21 Dec 2020, 05:53

    Hi all, I tried to use the docker install command but am getting the fallowing message when I try to run it.

    PermissionError: [Errno 13] Permission denied: './.env'

    I tried running with sudo, and also do 'sudo -i'

    docker is installed as I fallowed the tutorials here
    (sorry if outside links aren't allowed, I couldn't find rules to this forum) https://docs.docker.com/engine/install/ubuntu/

    1 Reply Last reply Reply Quote 0
    • X
      xan
      last edited by 21 Dec 2020, 05:57

      Here is the full log if it helps.

      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      100 1585 100 1585 0 0 68913 0 --:--:-- --:--:-- --:--:-- 68913
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      100 418 100 418 0 0 3834 0 --:--:-- --:--:-- --:--:-- 3834
      Traceback (most recent call last):
      File "/snap/docker/471/bin/docker-compose", line 11, in <module>
      load_entry_point('docker-compose==1.25.5', 'console_scripts', 'docker-compose')()
      File "/snap/docker/471/lib/python3.5/site-packages/compose/cli/main.py", line 72, in main
      command()
      File "/snap/docker/471/lib/python3.5/site-packages/compose/cli/main.py", line 125, in perform_command
      project = project_from_options('.', options)
      File "/snap/docker/471/lib/python3.5/site-packages/compose/cli/command.py", line 47, in project_from_options
      environment = Environment.from_env_file(override_dir or project_dir, environment_file)
      File "/snap/docker/471/lib/python3.5/site-packages/compose/config/environment.py", line 77, in from_env_file
      instance = _initialize()
      File "/snap/docker/471/lib/python3.5/site-packages/compose/config/environment.py", line 72, in _initialize
      return cls(env_vars_from_file(env_file_path))
      File "/snap/docker/471/lib/python3.5/site-packages/compose/config/environment.py", line 43, in env_vars_from_file
      with contextlib.closing(codecs.open(filename, 'r', 'utf-8-sig')) as fileobj:
      File "/snap/docker/471/usr/lib/python3.5/codecs.py", line 895, in open
      file = builtins.open(filename, mode, buffering)
      PermissionError: [Errno 13] Permission denied: './.env'

      1 Reply Last reply Reply Quote 1
      • M
        mgetka Power User
        last edited by 21 Dec 2020, 08:27

        If you have installed docker engine following the mentioned guide, then it's probably ok. You haven't mentioned what kind of docker-compose toolings you use. Whatever it is, you have clearly installed it through snap. It is not trivial for snap package developers to properly handle snap isolation, so various permission related issues are pretty common. Tweak your snap package permissions or install docker-compose in a classic way.

        X 1 Reply Last reply 21 Dec 2020, 19:39 Reply Quote 0
        • X
          xan @mgetka
          last edited by xan 21 Dec 2020, 19:39

          @mgetka Thanks for the hints. I am fairly new to docker, but know a good amount of linux so worked through it. Do you know a good tutorial for installing it the way you described? Or how to add snap permissions?

          Also not sure what the docker-compose tool is, would that be related to me installing with the docker repo method?

          1 Reply Last reply Reply Quote 0
          • M
            mgetka Power User
            last edited by mgetka 21 Dec 2020, 21:50

            Long story short, docker-compose is a tool that facilitates running services composed of multiple containers. Personally, I have mixed feelings about snap, and use it only for a limited number of desktop GUI based applications, so I cannot help you with permissions issues. it would be most straight forward just to install docker-compose using the docker provided guide.

            X 1 Reply Last reply 28 Dec 2020, 16:39 Reply Quote 2
            • X
              xan @mgetka
              last edited by 28 Dec 2020, 16:39

              For anyone interested I got this running by one installing docker-compose from the actual docker tutorial on how to do it, and then giving docker permission to run commands as root. There is a tutorial on how to do it on. On top of those I moved it to a server with 2gb of ram, as I noticed a few out of memory errors when it was trying to start up.
              https://docs.docker.com/engine/install/linux-postinstall/

              1 Reply Last reply Reply Quote 1
              3 out of 6
              • First post
                3/6
                Last post