Where can I learn Docker fundamentals?

3 years ago by dartanjinn to c/selfhosted

I jumped into Docker feet first a few months ago and have not had a real good time with it. Networking doesn't make sense, I can't ever seem to access config files without dropping to su -, all the tutorials and videos I find are pretty top level and assume the user already has a firm grasp on it. It's great for drop in stuff like open speed test and Vaultwarden but I recently tried setting up dashy and I can't even find the config files to edit. The Dashy documentation says the easiest way to edit the configs is to use code-server, so I spun up a code-server VM and can't even get it to open the files because the web based VSC doesn't allow for SSH editing. There's nothing explained in the documentation beyond that.

Yes I'm frustrated but I'm not bitching as if these solutions are trash, I'm simply asking where can I go to learn this shit from the ground up? It doesn't make any sense to me from the perspective that I've approached it. Networking seems to be silly and weird, entering an interactive TTY to the container seems to be useless as there's no package manager and doesn't seem to have vim, nano, or any native way to edit configs. It's been extremely frustrating so I ask you, where can I learn what I'm doing wrong and how to properly work with Docker?

load all comments
ColdCreasent 6 points 3 years ago

Lots of great information and suggestions in this discussion. Thank you everyone who are offering your input. I’d like to ask as well, how easy is it to setup docker for use in windows? I ask this because almost every guide I’ve found has docker running in Linux. I realize you are able to setup a docker in windows, but I was struggling to get basic instructions for windows, and even the tutorial in docker required me to switch back to docker types that don’t work in windows.

path: 0 1655394, hotness: undefined, score: 6, children: 3
nekusoul 4 points 3 years ago

From my experience the "default" experience, which is Docker Desktop, is a pain, due to what you described. In particular, Linux containers and Windows file permissions just don't mix well.

Other than that, there's three options:

  1. Docker Desktop, but used from WSL 2. This seems to be the cleanest solution nowadays. Never personally used it though. Officially supported.
  2. Installing Docker inside WSL 2. Configuring this correctly is a bit of a pain and not really supported AFAIK.
  3. Installing Docker in a VM, using the integrated Hyper-V functionality for example. The least amount of integration, but most reliable.
path: 0 1655394 1658221, hotness: undefined, score: 4, children: 2
markr 4 points 3 years ago

Docker Desktop for windows (DDW) using wsl2 for hosting containers is very easy to get started with. It also integrates directly with visual studio code.

Long term you will likely want any useful container services hosted on a Linux vm rather than wsl, as wsl (and DDW) are tied to and start with your Windows user account.

path: 0 1655394 1658221 1674870, hotness: undefined, score: 4, children: 0
ColdCreasent 1 point 3 years ago

And WSL 2 is the “Linux within windows” if I recall. And your other recommendation is a Linux vm with dockers running inside it? I’ll give that a try if I decide to switch to dockers again instead of just a vm. My original use case was to have a downloader and vpn bundled inside one docker so the rest of the system doesn’t see the vpn connection, but decided to use a vm to accomplish it instead due to “windows+docker” issues.

path: 0 1655394 1658221 1665721, hotness: undefined, score: 1, children: 0
selfhosted
selfhosted

@lemmy.world

login for more options
62956
6792
5617

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

go to feed...