dokploy icon indicating copy to clipboard operation
dokploy copied to clipboard

Install error: 1/1 mkdir /var/lib/docker: read-only file system

Open adelpro opened this issue 1 year ago • 10 comments

I'm trying to install using curl -sSL https://dokploy.com/install.sh | sh I get this error: 1/1 mkdir /var/lib/docker: read-only file system

  • im on the root user
  • im on ubuntu server v22
  • i have docker already installer .

adelpro avatar May 06 '24 13:05 adelpro

hey there, so going by what you said, you already have docker installed, check the permissions for the /var/lib/docker folder using this command ls -ld /var/lib/docker to see the kind of permissions you currently have, because i'm guessing that's the issue

if you see anything other than drwx--x--- 12 root root 4096 DATE TIMESTAMP /var/lib/docker then there's a problem, you have a bit of permission issues, you should be able to fix it with this command

sudo chown -R root:root /var/lib/docker sudo chmod -R 755 /var/lib/docker

then restart the server or just maybe restart docker withsudo systemctl restart docker

mosessmax avatar May 06 '24 14:05 mosessmax

same error, this is what I get when I run the command ls -ld /var/lib/docker

root@ubunto:~# ls -ld /var/lib/docker
drwxr-xr-x 2 755 root 4096 May  6 13:02 /var/lib/docker

adelpro avatar May 06 '24 15:05 adelpro

Using docker info command, i get this:

....
Docker Root Dir: /var/snap/docker/common/var-lib-docker
....

The default docker root is 'var/snap/...' not 'var/lib/...'

adelpro avatar May 06 '24 15:05 adelpro

Questions:

  1. Did you have already installed docker before run the installation command?
  2. What VPS provider are you using?

Siumauricio avatar May 06 '24 18:05 Siumauricio

@Siumauricio 1- Yes i have already installed docker before running the install command ( im using docker for other things)

2- im running Ubuntu server on a local pc and accessing it using ssh

adelpro avatar May 06 '24 19:05 adelpro

can you try this ?

  1. sudo su
  2. curl -sSL https://dokploy.com/install.sh | sh

Siumauricio avatar May 06 '24 20:05 Siumauricio

can you try this ?

  1. sudo su
  2. curl -sSL https://dokploy.com/install.sh | sh

I tried, same error

adelpro avatar May 06 '24 22:05 adelpro

My only recomendation to avoid this issue permissions is start from a fresh installation, because this clearly is Docker issues which doesn't have the right access to docker enviroment because you already had docker installed

Siumauricio avatar May 07 '24 04:05 Siumauricio

Have you found a solution for this @adelpro ? Can you reinstall docker?

Siumauricio avatar May 10 '24 03:05 Siumauricio

Have you found a solution for this @adelpro ? Can you reinstall docker?

Unfortunately i can't reinstall docker i have other containers up and running. I tried to stop docker service, the installation of Dokploy was completed with no errors, but after restarting the docker service, i didn't find the Dockploy container.

adelpro avatar May 10 '24 09:05 adelpro

I finally installed, my docker was installed on ubuntu server using snap, i uninstalled docker then re-installed using the official documentation (link here) Then i used the official install script to install Dockploy (linkhere)

adelpro avatar May 21 '24 16:05 adelpro

Glad to hear that, any related errors you can open another issue, thank you!

Siumauricio avatar May 21 '24 20:05 Siumauricio