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!

      • Shareni@programming.dev
        link
        fedilink
        arrow-up
        3
        arrow-down
        9
        ·
        1 year 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.

  • grue@lemmy.world
    link
    fedilink
    English
    arrow-up
    22
    ·
    1 year 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).

  • onlinepersona@programming.dev
    link
    fedilink
    English
    arrow-up
    15
    ·
    1 year 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
      ·
      1 year 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.

  • fidodo@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 year 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.

  • Goku@lemmy.world
    link
    fedilink
    arrow-up
    9
    arrow-down
    2
    ·
    1 year ago

    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.

  • Random Dent@lemmy.ml
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 year ago

    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.

  • youmaynotknow@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    1 year 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.

  • scratchandgame@lemmy.ml
    link
    fedilink
    Tiếng Việt
    arrow-up
    5
    arrow-down
    1
    ·
    1 year ago

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

    How Windows works is different I think?

    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…

    You don’t need.

    I heard you are using a debian-based distro, can you read the man pages for apt?

    Then use apt to find docker, and get it.

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

    It is not installed in the terminal. It is installed on the system, ON DISK!

    docker should be installed on /usr/bin. It is on PATH. Type docker and see what happen. If not, try searching on /usr/bin (on BSDs third party software are separated from base, so docker should be installed on /usr/local/bin)

    And the docker service should be started, if not. Use the fucking systemctl to start it. The service name should be docker, if I recall correctly

  • phanto@lemmy.ca
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    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!

  • electric_nan@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    1 year 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.

  • N0x0n@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 year ago

    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 !

  • Nibodhika@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    Ok, so I don’t know the specifics, this might not be entirely accurate, but this is a general step-by-step guide for Debian based distros like Mint.

    Install docker

    The first thing you need to do is install docker, this can be done via whatever GUI you use for a package manager or via the terminal using sudo apt install docker (I’m not sure docker is the name of the package, I’m just guessing, you can do an apt search docker to see what’s available)

    Add yourself to dockers

    This is likely not needed on Mint, but just in case your user should be in the docker group, i.e. run sudo gpasswd -a docker. I’m almost sure Mint does this by default.

    Enable docker systemd

    This also might not be needed, again I’m almost sure Mint does this for you when you install docker, but just in case the command is sudo systemctl enable docker

    Reboot

    Because there have been changes to your user groups you need to relogin, easier to reboot.

    use docker

    Now you have a system with docker, you can test this by running the following command docker run hello-world, if you see a bunch of text that contains “Hello from docker” docker is working.

    setup a docker-compose file

    Create a folder, and in that folder create a text file called docker-compose.yaml in that file. This file will tell docker what you want to run, for example to have Nextcloud (which is an awesome self-hosted drive alternative. I’m not going to teach you the specific services you want, you can figure those out by looking at their page on the linuxserver page or something) you can look here https://hub.docker.com/r/linuxserver/nextcloud on how to write your docker-compose file, for example you could write:

    services:
      nextcloud:
        image: lscr.io/linuxserver/nextcloud:latest
        container_name: nextcloud
        environment:
          - PUID=1000
          - PGID=1000
          - TZ=Etc/UTC
        volumes:
          - ./config:/config
          - ./data:/data
        ports:
          - 8080:80
          - 443:443
        restart: unless-stopped
    

    Then open a terminal on that folder and run docker compose up -d after that is done open a browser and go to http://localhost:8080 and begin using Nextcloud.

  • Presi300@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    2
    ·
    edit-2
    1 year ago

    AI can be of great help when learning docker, as it is genuinely super confusing. You don’t “find” docker, it’s a terminal program that you interact with… From the terminal.

    I’m gonna get A LOT of hate for this, but check out Warp terminal. It has a really nice GUI for configuration and really nice autocomplete for commands.

    • llii@feddit.de
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Why should you get hate for the warp terminal? I’ve never used it but it looks quite nice.

      • Presi300@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        arrow-down
        1
        ·
        1 year ago

        Because it’s closed source and requires a sign in. Imo worth it, as it’s a very nice terminal.