2/9/2024 0 Comments Ubuntu docker sudo not foundYou should now be able to run docker commands without sudo. After this, you may need to log out and back in, or even restart your NAS before the permissions take effect.Add your user to the new docker group: sudo synogroup -member docker $USER.Change the owner group of the docker.sock file: sudo chown root:docker /var/run/docker.sock. Create a docker user group: sudo synogroup -add docker.You'd have thought that it works the same way as Synology's base OS is Linux, but nope!įortunately, as the base OS is Linux, there is a way to achieve this: If you have attempted to follow those tutorials, you'll have quickly realised that tools like usermod and groupadd don't actually exist on Synology. Search for "run docker commands without sudo", and you'll come up with a million results telling you how to do it (see: ), but unfortunately none of these will work for Synology's OS. You can check if docker is correctly configured on your machine by. 1 min read Photo by Cookie the Pom / Unsplash Please make sure that you have a working docker environment on your machine before moving on.Glad it was so obvious that the directory permissions needed to be set to myuser and not root. Older versions of docker-compose do not support all the features required by the Airflow docker. UPDATE Running the command sudo chown myuser /usr/local/var/postgres/, and then running initdb afterward allowed the database to be initialized. Install Docker Compose v1.29.1 or newer on your workstation. Oh, really? Then why were you giving me permission errors?! So now I think the problem is that I just have to chown the folder, but still run initdb as my user rather than root. starting from debian image you need to install sudo, you can do it by adding run apt-get update & apt-get install. I finally type in sudo initdb /usr/local/var/postgres, to be met with: initdb: cannot be run as root. So then the alias command shows my new alias. sudo: test that sudo is not needed docker run hello-world Next, you will. profile, and seemed to be loaded just fine, so why wasn't the alias also working? Moving the alias into. That being said, my PATH additions were done in. UPDATE From this site, I read about the precedence of dotfiles. Running alias only shows an RVM alias, but not the sudo alias I tried to set up. profile now has this at the end: export PATH="/usr/lib/postgresql/9.1/bin:$PATH" bashrc file isn't read in a login shell, only profile. Based on reading I did here, it seems that the. UPDATE: Since I'm using Ubuntu and RVM, RVM recommended that I set up the terminal to "Run command as login shell". Finally type exit to log out of the root account and go back to your user. Then add your user to the sudo group: usermod -aG sudo .Then install sudo with your package manager (if you're in Ubuntu: apt-get install sudo ). so something is wrong with those getting set up. To do that, log in as root with the following command: su. When I run alias, I only show a single one. Still doesn't effin' work! It looks like the alias isn't working. root471bdb08b11a:/ apt install lsbrelease Reading package lists. So I ran a docker container and I wanted to check which version I was running: docker run -it ubuntu root471bdb08b11a:/ lsbrelease -a bash: lsbrelease: command not found root471bdb08b11a:/. So I added alias sudo='sudo env PATH=$PATH' to my. I just wanted to test something out real quick. I just get: -bash: initdb: command not found. However, running the command with sudo -i does not fix the problem. UPDATE: I believe it's related to this question. And when it comes to tasting the pudding. Then I followed step by step to install docker on Ubuntu as described here. I'm a bit of a newbie in Linux, but these are the sorts of super-irritating problems I keep running into! I am running windows 10 pro, and have Virtual Box installed and then installed ubuntu desktop as vm. How is this command not found? I just ran the damn thing! echo sudo $PATH shows the PostgreSQL directory in the path. Result is sudo: initdb: command not found. I try running sudo initdb /usr/local/var/postgres. Step 3: I try running initdb /usr/local/var/postgres. (Sidenote: Anybody know why this is necessary? Am I doing something wrong with the install? Everything else I've installed in Ubuntu "just works" without changing the $PATH.) For whatever reason, the install doesn't appear to add it to the path? So I had to manually add the line export PATH=$PATH:/usr/lib/postgresql/9.1/bin to the bottom of my ~/.profile. Step 1: I installed PostgreSQL using sudo apt-get install postgresql-9.1 as recommended on the PostgreSQL website
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |