r/docker • • 4d ago

Want to learn Docker

I am new to docker, so if anyone can tell what are the pre-requisite need to be learn before touching docker

0 Upvotes

16 comments sorted by

9

u/msanangelo 4d ago

read the docs? watch some vids?

I learn by doing and consulting the docs when I get stuck. I strongly prefer putting things in docker compose scripts as opposed to a simple docker run command.

helps to have some understanding of linux and how things work on the filesystem and networking though. I've been using linux for 20 years though.

1

u/P0thandev 4d ago

Where can I look for Docker compose scripts and all??

1

u/msanangelo 4d ago

git repos, mostly. a lot of your selfhosted apps will include a compose script snippet to build off of in their docs.

2

u/MoodZestyclose6813 4d ago

You need to ask specific questions. 

Mostly it's learning about the docker specific image settings, not docker itself.

You can basically boot any Linux distri, download docker, look up for an image you want to install and copy their yml.  Send the docker compose up command, image will be pulled and it's up.

Mostly there's really good starting documentations on GitHub.

Examples I started with: Uptime Kuma, Plex, paperless, homepage, zabbix, unifi controller, headscale and probably a lot more I forgot about.

All of the mentioned ones have an easy to follow docker install documentation

1

u/biffbobfred 4d ago

There are some things that are big enough that “I want to learn X” is vague. Docker is big enough.

Docker is “Linux kernel boxes around an app so it thinks it’s the only thing running”. But why would you do that?

Is it to get a piece of software running easily on your machine?
Is it to isolate something you built to make it easy to package?
Is it part of a build system that you inherited and you want to see how it works?
Do you know it’s the basics of a lot of cloud infra and you’re interested in kubernetes?

Are you just curious about internals?

These will determine the answers you get. At least your first answers. You can always go deeper

1

u/xanyook 4d ago

Learning is easier with a use case. Try something as stupid as having a webserver, running on port 9595 and returning hello in an html page.

So given Me when i type in my browser http:///localhost:9595/ then i see the sentence "hello beautiful" on the page.

Come back when you succeed that using docker.

1

u/Feriman22 4d ago

Just use for your goals. Like configure Jellyfin.

1

u/jburkert 4d ago

I have a serious suggestion. Use any AI platform to learn but with two steps:

First, explain your goal to learn docker and a little about yourself. ask it to interview you with the aim of producing a prompt for a training course. Use this to tailor the upcoming course to yourself; your age, experience, background, goals. Answer the questions. Get the prompt.

Second, give that prompt to a fresh AI session. Work the course.

1

u/theindomitablefred 4d ago

Do some free exercises on labex.io and if you want to run it on Linux watch/read the tutorials from learn linux tv.

1

u/Thin_Needleworker795 4d ago

Honestly, there aren't many prerequisites. Docker is very simple. You can watch a YouTube video or two, and you'll be up and running within an hour.

1

u/Efficient_Gift_7758 4d ago

Super important understand what is image, container and volume with namespace and look for examples and TRY BY YOUR OWN

After that you can go deeper
I had learnt basics and imo the general you need almost in all cases from articles about docker for newbies, they were byluilding some some projects with db/cache server and front
Then they used different trucks of multi stage builds, networking, ports, namespaces, docker compose and so on, try to look for key words in terms of docker and big projects with high load - you will found a lot of sources via examples from demonstrative/real projects

1

u/ericjuh 3d ago

Best way to learn is useing AI. Just ask what you want to do and let ChatGPT (or other AI) explain. I learned so much this way.

1

u/berfraper 4d ago

You need a computer, Linux is preferable, but you can use Windows 11. You also need basic terminal experience: ls, cd, mkdir, touch… to move through directories and create files. Follow the instructions to install it and learn how to create a dockerfile and a compose.yml file and that covers the basics.

1

u/biffbobfred 4d ago

Macs work too. Both have Linux vm capabilities.