I installed a few different distros, landed on Cinnamon Mint. I’m not a tech dummy, but I feel I’m in over my head.
I installed Docker in the terminal (two things I’m not familiar with) but I can’t find it anywhere. Googled some stuff, tried to run stuff, and… I dunno.
I’m TRYING to learn docker so I can set up audiobookshelf and Sonarr with Sabnzbd.
Once it’s installed in the terminal, how the hell do I find docker so I can start playing with it?
Is there a Linux for people who are deeply entrenched in how Windows works? I’m not above googling command lines that I can copy and paste but I’ve spent HOURS trying to figure this out and have gotten no where…
Thanks! Sorry if this is the wrong place for this
EDIT : holy moly. I posted this and went to bed. Didn’t quite realize the hornets nest I was going to kick. THANK YOU to everyone who has and is about to comment. It tells you how much traction I usually get because I usually answer every response on lemmy and the former. For this one I don’t think I’ll be able to do it.
I’ve got a few little ones so time to sit and work on this is tough (thus 5h last night after they were in bed) but I’m going to start picking at all your suggestions (and anyone else who contributes as well)
Thank you so much everyone! I think windows has taught me to be very visually reliant and yelling into the abyss that is the terminal is a whole different beast - but I’m willing to give it a go!
Docker is a cli only app, if you want a gui interface check out docker desktop
This is probably what OP wants. A gui
The crazy pills are the first step in learning. Embrace the crazy. Take more pills.
It worked for me!
Which pills would you recommend?
Estrogen? It works for my girlfriend and her Linux shenanigans!
Damn, I’ll have to try it out!
Once it’s installed in the terminal, how the hell do I find docker so I can start playing with it?
It’s not installed “in the terminal.” It’s installed on the computer; the terminal is just one way you might interact with it.
In particular, docker is a type of program called a ‘daemon’ or ‘server’: it runs in the background and doesn’t have an interface, per se. You can run docker commands and get their output, and you can of course interact with the services you’re using docker to run, but there is no “docker app” that runs as a foreground interactive process (either GUI app or ncurses terminal app).
I’m also pretty new to Linux, but I’ve finally gotten a bit of a grasp on it. I started learning Linux to set up a home server, so I also jumped straight into Docker. You have gotten some thorough replies, but I thought I’d share my chaotic journey with it that has ended in a decent ratio of success vs confusion. Note: I have used Ubuntu from the start.
Don’t use docker desktop. It’s garbage. Also, don’t use the Snap image.
$sudo apt install docker.io
$sudo apt install docker-compose
Those are both cli “programs”. They aren’t apps like you have on Windows. It seems VERY intimidating to talk into the void of the terminal, but you’ll build confidence. Docker commands work like any other commands, all in the same place.
Now install Portainer CE. The instructions are very simple to follow. You can reach Portainer through your browser at the localhost address it gives you, which you type directly into the URL bar. I think it’s http://localhost:9000.
Portainer will give you an easy visual way to manage Docker. You can perform many tasks through Portainer instead of using the command line. Honestly, I’m pretty sure you could do everything on Portainer and not even touch the terminal. I don’t suggest that because you will have to have at least a basic understanding of how Linux and Docker work. You will be confused, and you will feel crazy. Eventually, you’ll get more comfortable living in that psychosis.
On to Docker Compose!! This is my preferred way to run containers. I have a designated folder in /opt that I use for my compose files. This way, I know exactly how I set up my programs. My memory is awful and I tweak things so often that I’ll completely forget how I have even gotten to this point or where ANY of my files are. It’s pretty easy to find docker compose files online that you can copy and paste and it instantly works!
To make it simple, after I have saved my docker-compose.yaml file in the designated folder, I right click on the empty area and choose “open in terminal”.
$sudo docker-compose up -d
The -d instructs the program to continue to run, even if you exit out of the terminal. At this point, your container will also show up in portainer!
I think that covers the basics. My biggest tip is to keep a notepad handy to write down commands that you have to search for. Your bookmarks will fill up very quickly otherwise. Expect to get stuck sometimes. Expect to spend hours trying to troubleshoot an issue, then have it suddenly work with no idea what you actually did to fix it. Accept the win and never touch it again.
I have done fresh installs many times. Some because I’ve played with 10 different programs that I decided against and want the leftover files gone, some because I wanted to try different mixes of distros, and once because I legitimately broke the OS.
Keep your important stuff on an external drive to avoid any loss and don’t be afraid to mess around with it!
Btw, I’m a huge KDE plasma fan. It’s lighter than GNOME, but very user friendly. I’ve settled on Kubuntu as my distro of choice.
Well said. I’ve been using Linux for 15 years and using Docker for 6 years. I couldn’t have communicated as well as you did. You have a knack for teaching.
I can at least assure you that as a developer, docker is annoying to set up and their documentation is confusing.
Most things in Linux are easier to set up but sometimes installing things happens to be harder than it should be and docker is one of them.
You should keep in mind that compared to other OSs, a lot of Linux software is CLI only, so they won’t always show up in the applications list and you’ll need to check if you have it in a terminal.
Docker is professional software and because of that isn’t always the most intuitive thing to use.
The first big thing to get your head around is that there is no GUI. Everything you do to manage docker is through the command line. If you really want to, there’s some third party GUI software for managing Docker, but I haven’t used it in the 2 years I’ve been using Docker.
Once you’ve installed docker, there’s a little bit of setup required to make it run smoothly. The Docker Docs page on Linux post-installation steps has detailed instructions on how to do that and how to run a test container
TBH I’ve been using Linux for over a decade, can install & set up Arch from scratch etc. and I still don’t understand Docker.
Apt install docker.io
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
Go to IP:8000 and now you can build docker compose stacks. A far easier way to learn docker.
OP this is the answer but Ill provide simple steps in case this is not clear enough:
- Install docker
- Install docker-compose
- Install portainer (command from the post above)
- open Portainer GUI in browser using IP:8000 (from here you can do everything in GUI)
- go to stacks and create a new stack
- edit docker-compose for audiobookshelf - modify folder paths for volumes (example - change
./audiobooks:/audiobooks
to/path/to/folder:/audiobooks
) - paste that in stack and hit deploy
- go to IP:13378 to open Audiobookshelf GUI
- enjoy
one of my portainer instances completely broke a few months ago because of a failed db migration after an update. i’ve been using dockge ever since and i’m happy with it. it stores every stack you deploy as a docker-compose file on your regular filesystem, so if it ever breaks you can just edit the files instead
Oh that is nice. Yeah I tend not to use portainer nowadays but when I was learning docker it was a godsend. I’ll look into dockge though :)
I never tried dockage, but portainer also stores all docker-compose on filesystem (probably at
var/lib/docker/volumes/portainer_data/_data/compose
). You can also use “backup” button in GUI to download everything in single tar.gz archive. Folder structure is not the best, but its not hard to figure out. I’m not saying portainer is better though
I remember being so lost in the dark when starting docker. There’s 2 main approaches to launching docker containers. One is with CLI arguments and one is from a docker-compose.yml file.
I highly recommend the latter.
Try going to chatGPT and ask it to write a docker compose file for whatever service you’re trying to stand up.
It is a much better way to run volatile server apps that are changing at breakneck speed.
Docker’s hard. I never really got my head around it. I used “Swizzin Community Edition” to setup my media server. It was really easy compared to Docker-based solutions.
Honestly, for those tools, I’d recommend posting in piracy@lemmy.dbzer0.com.
Echoing some other comments, those are decently complex tools all around. I’d recommend doing a few tutorials on docker before trying out that project (short ones, just to build a mental model).
As others have said, docker is a command line tool.
docker -v
in your terminal should be enough to “find” it. That’ll show you the version of docker you have installed.From there, I’d recommend the hello world image to start (this should get you there https://www.geeksforgeeks.org/docker-hello-world/).
From there, keep messing with it. Get more familiar with docker through their docs. Read a bit on images vs containers, port mapping, and volumes and mounts.
As others have said, look for docker only in the terminal. And then expect to spend a little time familiarizing yourself with what problem docker solves and how it solves it. Once you’ve got docker in your back pocket, you’ll be very well situated to set up all kinds of apps.
And when you run into other problems, there’s communities to answer and work through the issues
I have been in and out of Linux for years and Docker is just… Hard. There’s a thing called portainer, and it makes it so you can muck with Docker from a web browser, and that is literally all I know at this point. Still, might be helpful? I have some Docker stuff, and it works the way I assume my mom thinks Linux works. Someone typed fast and magic happened. Best of luck!
I strongly suggest that you install portainer if this is your first time playing with docker.
It’ll make your life and learning curve dramatically easier.
I’m not suggesting you dont learn how to do it all over CLI (I actually think CLI is way easier and faster to deploy once you get the hang of it), but if you’re looking to deploy something right away, I believe portainer is your best bet.
This. I had the same issue, and just about every tutorial focuses on the command line, and I get why… It’s way more powerful and actually becomes the standard that people who are using docker repeatedly would need to learn.
That being said, this was my first foray into containerizing things since VMware became a thing. So I needed a UI that felt familiar and helped me understand some of the Dockers specific settings and configurations. This was a godsend in helping me get things up and running, and then later I had to learn how to do it properly with docker compose.
For what it’s worth, I still keep my portainer instance running, and use it for some administration stuff like resets, but I think it helps smooth my learning curve. Docker via the command line exclusively pretty much requires you to understand all of the notions and concepts involved.
That’s exactly right. I run UnRaid as my NAS, and not a single docker has been installed from their app store. I also still have Portainer running (at this point I have no idea why anymore, since I haven’t used it in over a year) and it barely uses any resources. Portainer was my first shot at docker containers, and I’ll always be grateful to the developers. I doubt I would have continued learning Docker if Portainer had not existed.
Been there, now I have over 12 containers running h24 on an old spare laptop with everything exposed via traefik (reverse proxy), self-signed CA, local DNS… what a ride ^^'.
The best advice and thats what helped me to get going, is to watch/follow some youtube videos about docker and how to expose your first container locally, so you get the general gist on how it works.
2 years ago, NetworkChuck introduced me to docker container. Not saying he’s the best youtuber to get you into docker and learning and stuff, but it’s a GOOD starting point :).
There is also Christian Lempa, Tech world with nana, who also will you give you some good pointer with docker and docker compose.
Good luck !
Docker is a
developer* tool, not really something you should be using without some technical knowledge, or at least some experience in the terminal. It’s purely a terminal application, so you just type “docker” in the terminal to use it. You can also type “man docker” to view the manual (which shows arguments and command you can use) but again, that won’t help much without some prior knowledge.The things you’re trying to use look like self-hosted web servers, which is a lot to set up for someone who’s new to the terminal. I won’t stop you if you want, but be warned. I’d recommend using something simpler like cozy, which you should be able to find and download in the software store.
*Edit: it’s not only a developer tool, it’s used for deployment as well. I lumped the two together. It’s still a tool made for people with more familiarity using the terminal though.
Docker is a developer tool
First, it’s not. Second - so what if it is? Sounds like gatekeeping to me. They’ve expressed interest in learning how to use it, that’s enough.
If they want to use it that’s fine. I’m just cautioning against using a command line tool like that until they feel somewhat comfortable with the terminal.
The terminal is not some arcane source of dark power to be feared. It’s one of the defining characteristics of the Linux ecosystem. Anybody looking to use Linux should be expecting to use it and tools that are built for it.
It’s not like they could even really do any damage with docker either.
Docker is a deployment tool. Not a developer tool.
Unless you’re trying to simplify your deployment stack there isn’t really a compelling reason to install it unless you’re trying to learn something new for the fun of it.
With that said you need things to deploy to make it useful. Like a database server, web server, etc.