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!

  • rutrum@lm.paradisus.day
    link
    fedilink
    English
    arrow-up
    25
    ·
    9 months ago

    To be fair, you’re taking on a lot of new things at once. You can spin up docker containers on windows too, all while using a UI. I think it’s great your exposing yourself to self hosting, linux, command line interface, and containerization all at once, but don’t beat yourself up for it taking longer than expected. A lot of it takes time. I encourage you to keep trying and playing. Good luck!

    • Pantherina@feddit.de
      link
      fedilink
      arrow-up
      11
      ·
      edit-2
      9 months ago

      There is docker desktop on Linux too.

      sudo apt install docker flatpak -y
      # add flathub if not already there
      flatpak install docker
      

      Edit: please use Podman. And if you think about Virtualbox, please use Virt-manager instead. Both are RedHat products and they are pretty awesome. Podman is more secure and works well for your job, it is letter-for-letter compatible with docker. You can use podman-compose if you need) but that requires to run a daemon which is also possible.

      You can use Podman with many container sources natively, while docker only allows dockerhub. Says enough.

      • Possibly linux@lemmy.zip
        link
        fedilink
        English
        arrow-up
        2
        ·
        9 months ago

        Not recommended as for one it is proprietary and two its more confusing to have tons of buttons than it is to write a docker compose.

        • Pantherina@feddit.de
          link
          fedilink
          arrow-up
          1
          ·
          9 months ago

          I mean I would recommend them to use Podman. Docker on Linux Mint was a mess last time I used it.

      • Shareni@programming.dev
        link
        fedilink
        arrow-up
        4
        arrow-down
        9
        ·
        9 months ago

        A GUI isn’t going to help, mon capitaine. Start-stop is the easy part, OP will still need to create a docker-compose.yml and a systemd unit.

        The OP wants a LLM to walk him through the process and generate all of the relevant files. If they entered 2-3 prompts into gemini/chatgpt they wouldn’t have needed this thread.

  • BeansLeg@lemm.ee
    link
    fedilink
    English
    arrow-up
    23
    arrow-down
    2
    ·
    9 months ago

    The crazy pills are the first step in learning. Embrace the crazy. Take more pills.

  • MangoPenguin@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    19
    ·
    9 months ago

    Once it’s installed in the terminal, how the hell do I find docker so I can start playing with it?

    Type docker in the terminal, it’s a CLI application.

    But it sounds like you might want to install Docker Desktop, which does give you a GUI to use.

  • onlinepersona@programming.dev
    link
    fedilink
    English
    arrow-up
    18
    arrow-down
    1
    ·
    9 months ago

    Docker is one of the container technologies

    Containers vs Images

    This is a very simplified explanation, which hopefully clears up for you. As with all simplifications, they aren’t entirely correct.

    Containers put processes, files, and networking into a space where they are secluded from the rest. You main OS is called the host and the container is called the guest. You can selectively share resources with the guest. To use an analogy, if you house were the computer with linux, if you took a room, put tools and resources for those tools into it, put workers into it, got them to start working and locked the door, they’d be contained in the room, unable to break out. If you want to give workers access to resources, you either a window, a corridor, or even a door depending on much access you want to give them.

    Containers are created from an image. Think of it as the tools, resources, and configuration required every time you create a room in your house for workers to do a job. The woodworkers will need different tools and resources than say metalworkers.

    Most images are stored on DockerHub. So when you do docker pull linuxserver/sonarr you download the image. When you do docker run linuxserver/sonarr you create a container from an image.

    Installation

    You’re on Cinnamon Mint which is linux distribution derived from another linux distribution called debian. You have to follow the installation instructions. Everything is there. If something doesn’t work, it’s most likely because you skipped a step. The most important ones are the post-installation steps:

    • Adding your user to the docker group
    • Logging out and back in (or simply restarting)

    Those are the most commonly missed steps. I’ve fallen for this trap too!

    Local help

    To use linux, you need to learn about ways to help yourself or find help. On linux, most well-written programs print a help. Simply running the command without any arguments most often output a help text --> running docker does so. If they don’t, then the --help flag often does --> docker --help. The shorthand is -h --> docker -h.

    Some commands have sub commands e.g docker run, docker image, docker ps, … . Those subcommands also take flags of which -h and --help are available.

    The help output is often not extensive and programs often have a manual. To access it the command is man --> man find will output the manual for the find command. Docker doesn’t have a local manual but an online one.

    For clarification when running a command there are different ways to interpret the text after the command:

    Flags/Options

    These are named parameters to the command. Some do not take input like -h and --help which are called flags. Some do like --file /etc/passwd and are often called options.

    Arguments

    These are unnamed parameters and each command interprets them differently. echo "hello world" --> echo is the command and "hello world" is the argument. Some commands can take multiple arguments

    Running containers

    Imperatively

    As described above docker run linuxserver/sonarr runs an image in a container. However, it runs in the foreground (as opposed to the background in what is most often called a “daemon”). Starting in the foreground is most likely not how you want to run things as that means if you close your terminal, you end the process too. To run something in the background, you use docker run --detatch linuxserver/sonarr.

    You can pass options like -v or --volume to make a file or folder from your host system available in the guest e.g -v /path/on/host:/tmp/path/in/guest. Or -p / --port to forward a host port to a guest port e.g -p 8080:80. That means if you access port 8080 on your host, the traffic will be forwarded to port 80 in the guest.

    These are imperatives as in you command the computer to do a specific action. Run that docker image, stop that docker container, restart these containers, start a container with this port forward and that volume with this user …

    Declaratively

    If you don’t want to keep typing the same commands, you can declare everything about your containers up front. Their volumes, ports, environment variables, which image is used, which network card/interface they have access to, which other network they share with other containers, and so on.

    This is done with docker-compose or docker compose for newer docker versions (not all operating systems have the new docker version).

    This already a long text, so if you want to know more, the best resource is the docker compose manual and the compose file reference.


    Hopefully this helped with the basics and understanding what you’re doing. There are probably great video resources out there that explain it more didactically than I do with steps you can follow along.

    Good luck!

    CC BY-NC-SA 4.0

    • Arthur Besse@lemmy.mlM
      link
      fedilink
      English
      arrow-up
      2
      ·
      9 months ago

      You main OS is called the host and the container is called the guest

      The word “guest” is generally used for virtual machines, not containers.

        • Arthur Besse@lemmy.mlM
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          9 months ago

          Can containers boot on their own? Then they are hosts, if not they are guests.

          It depends what you mean by “boot”. Linux containers are by definition not running their own kernel, so Linux is never booting. They typically (though not always) have their own namespace for process IDs (among other things) and in some cases process ID 1 inside the container is actually another systemd (or another init system).

          However, more often PID 1 is actually just the application being run in the container. In either case, people do sometimes refer to starting a container as “booting” it; I think this makes the most sense when PID 1 in the container is systemd as the word “boot” has more relevance in that scenario. However, even in that case, nobody (or at least almost nobody I’ve ever seen) calls containers “guests”.

          As to calling containers “hosts”, I’d say it depends on if the container is in its own network namespace. For example, if you run podman run --rm -it --network host debian:bookworm bash you will have a container that is in the same network namespace as your host system, and it will thus have the same hostname. But if you omit --network host from that command then it will be in its own network namespace, with a different IP address, behind NAT, and it will have a randomly generated hostname. I think it makes sense to refer to the latter kind of container as a separate host in some contexts.

  • NateSwift@beehaw.org
    link
    fedilink
    English
    arrow-up
    17
    ·
    9 months ago

    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

  • StrawberryPigtails@lemmy.sdf.org
    link
    fedilink
    arrow-up
    11
    arrow-down
    1
    ·
    9 months ago

    Linux is a slightly different way of thinking. There are any number of ways that you can solve any problem you have. In Windows there are usually only one or two that work. This is largely a result of the hacker mentality from which linux and Unix came from. “If you don’t like how it works, rewrite it your way” and “Read the F***ing Manual” were frequent refrains when I started playing with linux.

    Mint is a fine distro which is based off of Ubuntu, if I remember correctly. Most documentation that applies to Ubuntu will also apply to you.

    Not sure what exactly you installed, but I’m guessing that you did something along the lines of sudo apt-get install docker.

    If you did that without doing anything ahead of time, what you probably got was a slightly out of date version of docker only from Mint’s repositories. Follow the instructions here to uninstall whatever you installed and install docker from docker’s own repositories.

    The Docker Desktop that you may be used to from Windows is available for linux, however it is not part of the default install usually. You might look at this documentation.

    I don’t use it, as I prefer ctop combined with docker-compose.

    Towards that end, here is my docker-compose.yaml for my instance of Audiobookshelf. I have it connected to my Tailscale tailnet, but if you comment out the tailscale service stuff and uncomment the port section in the audiobookshelf service, you can run it directly. Assuming your not making any changes,

    Create a directory somewhere,

    mkdir ~/docker

    mkdir ~/docker/audiobookshelf

    This creates a directory in your home directory called docker and then a directory within that one called audiobookshelf. Now we want to enter that directory.

    cd ~/docker/audiobookshelf

    Then create your docker compose file

    touch docker-compose.yaml

    You can edit this file with whatever text editor you like, but I prefer micro which you may not have installed.

    micro docker-compose.yaml

    and then paste the contents into the file and change whatever setting you need to for your system. At a minimum you will need to change the volumes section so that the podcast and audiobook paths point to the correct location on your system. it follows the format <system path>:<container path>.

    Once you’ve made all the needed changes, save and exit the editor and start the the instance by typing

    sudo docker compose up -d

    Now, add the service directly to your tailnet by opening a shell in the tailscale container

    sudo docker exec -it audiobookshelf-tailscale /bin/sh

    and then typing

    tailscale up

    copy the link it gives you into your browser to authenticate the instance. Assuming that neither you or I made any typos you should now be able to access audiobookshelf from http://books If you chose to comment out all the tailscale stuff you would find it at http://localhost:13378

    docker-compose.yaml

    version: "3.7"
    services:
      tailscale:
        container_name: audiobookshelf-tailscale
        hostname: books                         # This will become the tailscale device name
        image: ghcr.io/tailscale/tailscale:latest
        volumes:
          - "./tailscale_var_lib:/var/lib"        # State data will be stored in this directory
          - "/dev/net/tun:/dev/net/tun"           # Required for tailscale to work
        cap_add:                                    # Required for tailscale to work
          - net_admin
          - sys_module
        command: tailscaled
        restart: unless-stopped
      audiobookshelf:
        container_name: audiobookshelf
        image: ghcr.io/advplyr/audiobookshelf:latest
        restart: unless-stopped
    #    ports:                                                                  # Not needed due to tailscale
    #      - 13378:80                                                                                                     
        volumes:
          - '/mnt/nas/old_media_server/media/books/Audio Books:/audiobooks'       # This line has quotes because there is a space that needed to be escaped.
          - /mnt/nas/old_media_server/media/podcasts:/podcasts                               # See, no quotes needed here, better to have them though.
          - /opt/audiobookshelf/config:/config                                       # I store my docker services in the /opt directory. You may want to change this to './config' and './metadata' while your playing around
          - /opt/audiobookshelf/metadata:/metadata
        network_mode: service:tailscale                                  # This line tells the audiobookshelf container to send all traffic to tailscale container
    

    I’ve left my docker-compose file as-is so you can see how it works in my setup.

      • Para_lyzed@lemmy.world
        link
        fedilink
        arrow-up
        8
        arrow-down
        2
        ·
        9 months ago

        This is a discussion about Docker, which is a complex terminal-based containerization system. This is not a program that is typically used by the average user. Docker’s complexity does not imply that Linux requires this kind of set up to use as a normal desktop. This is usually server software. Docker is also available on Windows and MacOS, and is partnered with Microsoft (you know, the company that makes Windows? The desktop OS with the highest market share?). Are you going to complain about how Windows will never reach mass adoption because users are able to install complex tools that require a steep learning curve to use? You can install Docker on Windows and use the same commands and configs, so do you believe that Windows suffers this same problem?

        Before you point out the start of that comment with the “Linux mentality” stuff, while some of that is certainly true, you can now do everything an average user needs to do in an intuitive GUI, just like Windows (better in many cases, actually). Half the listed commands (making directories and files) can be done in the file manager just like Windows, normal apps can be managed in app stores, and the rest of it is docker specific, which is (again), server-oriented software. I’m not a fan of their mentality about how things work in Linux, because it’s very much an old mentality that doesn’t account for the immense amount of change that has happened in the past decade to make Linux more accessible.

        I don’t understand why people come to the Linux communities to complain that Linux is “too hard” or “too complex” to be usable. If you don’t have an actual interest in Linux, find another community. If you want a simple experience, use a simple distro that’s meant to be easy to use, and use software that is easy to use.

      • Nibodhika@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        9 months ago

        Getting this setup on Windows would be even harder because it would involve installing docker manually or setting up WSL and following these steps. What OP is trying to do is a complex thing that most people don’t need, that would be the same as saying Windows is hard because setting up a VM with hardware passthrough is difficult on Windows, completely missing the point that that is a complex thing to do and that it’s complex on any other OS as well.

        • Kecessa@sh.itjust.works
          link
          fedilink
          arrow-up
          2
          arrow-down
          3
          ·
          9 months ago

          Yeah but the difference is that even for simple things, Linux instructions look like what was posted by the person I replied to.

          • Nibodhika@lemmy.world
            link
            fedilink
            arrow-up
            3
            ·
            edit-2
            9 months ago

            Being a person who replies to lots of new users questions I strongly disagree. 99% of the questions come from a Windows mindset, so it requires some deconstruction of the way the person is thinking, have you noticed how very few Mac users ask beginner questions on Linux forums?

            There’s a big difference between something is different and someone is used to doing the things differently, driving on the left or right is just as difficult, bit if you’ve driven all of your life one way switching up can be difficult. Just like that a lot of Linux concepts are different from what people are used to if they come from a Windows background, but the same is true the other way around. As someone who’s been using Linux for decades I find windows weird and convoluted, but I know that this is just my perception, and that someone who’s using it daily is used to that.

            Edit: if you’re going to reply to this, mind providing an example of something you think is easy on Windows but hard on Linux?

      • StrawberryPigtails@lemmy.sdf.org
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        9 months ago

        It’s not as difficult as the length of my comment implies, and doing it in the terminal simplifies the explanation quite a bit.

        The average user though might never need to use the terminal. Most of what they want can be done in the browser.

        As for Linux mass adoption, that happened years ago. Just nobody noticed. Android, Chromebook, Steam Deck are all Linux based and MacOS (BSD derived) is a close relative. And Microsoft has even made it possible to run linux command line programs in Windows, with some caveats, using WSL. And that’s not counting the majority of servers, networking gear and space craft running linux or unix.

        • Kecessa@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          arrow-down
          3
          ·
          9 months ago

          “They’re all close relatives”

          on which the experience has been tuned to make them as user friendly as possible to the point where they have nothing in common with desktop Linux from an average user perspective.

  • Secret300@sh.itjust.works
    link
    fedilink
    arrow-up
    7
    ·
    9 months ago

    I don’t mean to be that guy but like did you even read a basic tutorial? Or did it install and the docker commands aren’t working still?

  • fidodo@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    9 months ago

    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.

  • grue@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    1
    ·
    9 months ago

    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).

  • Corgana@startrek.website
    link
    fedilink
    arrow-up
    5
    ·
    9 months ago

    Is there a Linux for people who are deeply entrenched in how Windows works?

    Zorin is this, though your choice of Mint is good too. It will not help you understand docker though.

    If you’re trying to do Audibookshelf on a home server CasaOS made docker super easy for me.

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    9 months ago

    I think it will be easier to use docker compose with a premade docker compose file.

    Create a new directory cd into it and then nano docker-compose.yaml. For instance, here is a docker compose I found one the audio bookshelf website:

    version: "3.7"
      services: 
        audiobookshelf:
          image: ghcr.io/advplyr/audiobookshelf:latest
          ports: - 13378:80
          volumes:
            - </path/to/audiobooks>:/audiobooks
            - </path/to/podcasts>:/podcasts - </path/to/config>:/config
            - </path/to/metadata>:/metadata
    

    https://www.audiobookshelf.org/docs/#docker-compose-install

  • youmaynotknow@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    9 months ago

    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.

  • electric_nan@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    9 months ago

    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.