Docker for Windows is EASY

I didn't understand the ins and outs of Docker for a long time.

I understood the what: it is (essentially) an adapter to plug software into any hardware, in the "write once, run anywhere" ethos.  

I understood the why:  You can take one application and run it directly on Windows, Synology, Linux, or whatever, without recompiling or worrying about software / hardware dependencies.  Very handy for software development.  

I understood the how:  You install Docker, which hosts programs in virtual machines called "containers".  The program has its own private container, and Docker handles the interactions between the container and the OS. 

But I didn't understand the steps required to actually do it.  And I don't do anything on my PCs that I don't understand.

And it all sounded really complex:

  • "Self-hosting" calls back nightmares of debugging networking problems, which always sucks.
  • "Homelab" sounds like a time-suck tar pit for Youtube nerds: bleeding-edge experiments running buggy software for those who somehow enjoy such things.
  • Reddit is filled with opaque jargon.
  • The documentation is brutal.  

So I avoided it.

 However, Docker for Windows is EASY.

-

I'm going to use rustdesk as an example.  It's a bad example because you can use Rustdesk without self-hosting it.  But this works for any Docker program you want.

 Here's what you do:

1.  Install Docker Desktop for Windows.

2.  Go to your C:\ drive.

3.  Create a directory for your first Docker application, such as c:\rustdesk-server.  

  Note:  You can name it whatever you want, and place it wherever you want.

4.  Go find the official "docker-compose.yaml" file for rustdesk.  This is, effectively, the installer program.

**  WARNING:  Just like with ANY software you install, be sure you are using the correct, official installer.  Malware disguised as legitimate software is hardly a problem confined to Docker, so always be careful! **

5.  Open Command Prompt, change directories to your rustdesk folder (c:\rustdesk-server) and run:

    docker compose up -d

This run the installer.  

.....aaaaand shazam!  You've got your first Docker application up and running!

-

Now, you (obviously) have to actually set up said application, which is a whole 'nother thing.  But getting it installed is - basically - just as easy as running a "normal" Windows installer program.

(Now, if opening Command Prompt or navigating to a subdirectory is beyond you, no worries - but you probably shouldn't be messing with Docker anyway. This is about as simple as it gets.)

-

Want another?

1.  Create a new subdirectory for the new application.

2.  Download the appropriate "yaml" file into that directory.

3.  Run the yaml file.

Shazam!  Docker application #2 is running!

-

Uninstallation is almost as easy.  You just have to stop (close) the running program beforehand, which is nothing new.

1.  Open Command Prompt and navigate to the right subdirectory.

2.  Stop the Docker program:

   docker compose down

3.  Delete the subdirectory containing the stopped, unwanted program.

You can also (optionally) delete the original downloaded installation software package within Docker Desktop:

4.  Open Docker Desktop.

5.  Open "Images" on the left sidebar.

6.  Either:

  • Click the trash icon next to any unwanted images; and/or
  • Run the Clean / Purge data option.

 -

Notes:

-  Many Docker programs will run themselves automatically on boot or login.  This depends on the program, and not on Docker.

-  Some programs might need administrator rights to work.  This is usually handled by selecting the right options on installation.

-  You should (probably) stop the Docker application before trying to uninstall it.  Just good practice.

-

Now that you understand Docker on SRM, take a look at some useful apps for beginners.

Comments

Popular posts from this blog

Wiring an ecobee3 without the G wire (G-wire, fan wire)

How to fix Lexus / Toyota "AWD system malfunction 2WD mode engaged"

How to transfer Terraria data to a new Android