What is Docker? Let's explain! πŸ‹πŸ³

(Thread) πŸ§΅πŸ‘‡

#100DaysOfCode
#CodeNewbies
#docker
πŸ”ŒBefore I begin: This thread is also available in a more convenient and more accessible format at my new project "Let's Explain" (where you'll find all my other "let's explain" threads as well):

β–Ά letsexplain.netlify.app/docker
So you've just built a project. Let's say it's a to-do app. There are plenty of things involved:

- front-end
- back-end
- database...
For your project, you're using React as front end, Python with Flask as a backend API, and MySQL as a database.
You're also using Mac as your main operating system on your computer for developing and testing your app locally.

Anything you download for your app has been tailored for the operating system you're using.
Now you talk to your friend about this app you're building and he seems pretty excited to try it out! Thing is, it's not hosted anywhere at the moment so it's only available locally.
So you need to tell your friend that he needs to get the code from Github, then download the necessary stuff in order to run the app: Node, Python, MySQL etc.
So your friend, who is running Ubuntu, goes ahead and installs the necessary tools to run your to-do app.

Once everything is up and running, your friend tries to run your to-do app. But... he fails. WHY? WHAT IS GOING ON?
After days of investigation, you find out that you're running different versions of MySQL and different versions of Node. It turns out, this is because you're running different operating systems!
After days of debugging, painful googling and comparing versions, you finally manage to get your to-do app up and running on his machine.
What if there was an easier way to do this? What if you could just have one version of each tool, or even the operating system, put it into a little package and send it to anyone who wants to run your app straight away? And it would run correctly every time without the hassle?
Enter Docker!
Docker is a tool that helps you grab everything, from the operating system, to all the frameworks, tools and libraries you might need and put them into little packages called "containers"
These packages are created so you can easily take them wherever you want. Either give it to your friend to try your app, for a colleague to be able to develop using the same environment, or even put it on a server.
You can feel confident that no matter where you put the container, whichever operating system or environment, the app will work the same way!
In the case of your app, with Docker, you can create a container, add a specific version of Linux, install the latest version of Python, the latest version of Node and the latest version of MySQL. You can give the container to your friend and he will have all the same versions!
To get started with your first container is quite simple too! First install Docker (see here: docker.com/get-started) open a terminal and type this:

docker run -it ubuntu
The command will create a new container which has Ubuntu as the operating system.

The first time you run it, it will take a while until it it downloads the stuff necessary to run Ubuntu, or the Ubuntu "image".
Now you can run commands just like you would in a normal Ubuntu installation! Give it a go!
You can find lots of ready-made "images" for various tools such as Node, Python, MySQL etc. in the Docker Hub.

Check it out here: hub.docker.com

Enjoy using Docker and its countless capabilities!

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Savvas πŸ§”πŸ»

Savvas πŸ§”πŸ» Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @SavvasStephnds

1 Oct
What is async/await in Javascript? Let's explain

(Thread) πŸ‘‡πŸ§΅

#100DaysOfCode
#CodeNewbies
We've already talked about Promises in a previous thread. Read it if you haven't already. This thread will be a continuation of that thread so please see that first:

So as we mentioned before, Promises are a way of telling Javascript, "go fetch some data but I'm not going to sit and wait because my browser would freeze. When you DO get a response eventually, do THIS with the data".
Read 20 tweets
26 Sep
β™ΏοΈπŸ¦Ύ ACCESSIBILITY QUIZ!

10 questions. Have fun!

#100DaysOfCode #a11y #CodeNewbie

🧡 πŸ‘‡
QUESTION 1:

The standards for web accessibility are called:

A. Accessible Web Initiative
B. Web Accessibility Working Group
C. Web Content Accessibility Guidelines
ANSWER: C
Read 22 tweets
22 Sep
❌ β€œI built a to-do app with React”

βœ… β€œI have built an app that has helped people stay on top of their day-to-day tasks and stay organised using my React skills”

πŸ‘‰ It’s about the impact you have on people, not your skill set
❌"I built a weather app with Vue"

βœ… "Enabled users to plan their day by building an app which provides clear and convenient hourly weather forecasts. Make flexible, expandable and fast by using the Vue framework to build the app"
❌ "Created a website for a restaurant"

βœ… "Enabled a local restaurant to quickly and conveniently communicate with their customers about their menu options and latest offers by creating a fast website for their establishment, thus increasing their profits by 15%"
Read 4 tweets
21 Sep
What is "this" in Javascript? Let's explain:

Thread πŸ§΅πŸ‘‡

#100DaysOfCode #CodeNewbies
First off, a note: I was planning on create a thread like this for ages, but I have been putting it off for one simple reason: just like a lot of people, I too didn't quite get the "this" keyword. It still baffles me a bit but hopefully this basic walkthrough will make sense.
"this" is basically a label. It's a label you put on a function to show who it belongs to. Sort of like putting a label on your food at work saying "THIS SANDWICH BELONGS TO <your name>"
Read 15 tweets
1 Sep
The problem with the "typewriter effect" on your website and how to fix it.

(Thread) πŸ§΅πŸ‘‡

#100DaysOfCode #CodeNewbie #accessibility
So you want to show off your portfolio website and you want to add some fancy graphics to show off your Javascript skills. What better way than by adding a fancy "typewriter effect" to show the world your multi-faceted personality?
It's nice, sure! But there's a problem. And it has to do with accessibility.

Simply put, blind people visiting your website with screen readers, just can't see what the hell you've written on that section.
Read 10 tweets
25 Aug
What is a Promise in Javascript? Let's explain!

Thread πŸ§΅πŸ‘‡

#100DaysOfCode #CodeNewbies
Promises in Javascript are a way of isolating something that will likely take a while to complete. Like getting content from another website, or a file
See this code below:

var hello = "Hello world"
console.log(hello)
var number = 5
var numberSquared = 5 * 5
console.log(numberSquared)
Read 15 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!