Do data scientists need to know @Docker?

Most definitely. But you don't need to know everything. When it comes to Docker images, here are the five commands you absolutely must know.

#100DaysOfCode #66DaysOfData

🧵👇🏽
1/ docker image pull

This command downloads images. You can pull images from repositories inside of remote registries. By default, images are pulled from @Docker Hub.

This command will pull images tagged as `latest` by default.
2/ docker image ls

This command lists all of the images stored in your @Docker hosts local image cache. You can use the `--digest` option to get the SHA256 hash code of the image as well.
3/ docker image inspect

A powerful command that allows you to see all the nitty-gritty detail of an image.

The layer data, the metadata, all of it.
4/ docker manifest inspect

With this command you can inspect the manifest list of any image stored on @Docker hub.

For example, if you wanted to see the manifest list of the ubuntu image you can type: `docker manifest inspect ubuntu` to see it.
Side bar: a manifest is a list of image layers that is created by specifying one or more image names.

A @Docker image starts with a base layer, and as new changes are made and new content is added, new layers are added on top.

An image is a combo of all layers stack in order.
5/ docker image rm

You use this command to delete an image.

Note: if an image layer is shared by more than one image, that layer won't be deleted until all images that reference it have been deleted.

Also, you can't delete an image that is associated with a running container
Bonus:

Use `$ docker image rm $(docker image ls -q) -f` to delete all imaged on a @Docker host.
If you found this helpful, be sure to go back to the top and share it with your friends.

Smash that follow on my profile and hit the bell notification so you don't miss out on posts while you're at it.

Huge shout out to @nigelpoulton - learned all this in his @Docker class on @EducativeInc
Be sure to checkout my thread for common @Docker container commands here:

• • •

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

Keep Current with Harpreet Sahota 🥑

Harpreet Sahota 🥑 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 @DataScienceHarp

Mar 29
What the hell is a Dockerfile?

Hint: it's not someone with an infatuation with Docker.

It's the starting point for creating your container image. This is what describes an application and tells Docker how to build it into an image.

You need to understand it's anatomy.

🧵👇🏽
First things first.

It's Dockerfile.

Not dockerfile, docker file, DockerFile, or dOcKfiLe.

Dockerfile.

How you spell it matters.

Keep this file in the root directory of your build context and don't underestimate how powerful a form of documentation this is.
There are EIGHT instructions you need to know about for a Dockerfile:

1) FROM
2) LABEL
3) RUN
4) COPY
5) WORKDIR
6) EXPOSE
7) ENTRYPOINT

Let's talk about what each of these does.
Read 15 tweets
Mar 28
Let's talk about the 8 most useful @Docker commands for working with Docker containers.

#MLOps #100DaysOfCode #MachineLearning #66DaysOfData

🧵 👇🏽
1/ docker container run

You use this command to start a new @Docker container.

It accepts an image and a command as its arguments. The image is used to create the container. The command is the application the container will run when it starts.
For example, running the following command will start an ubuntu container and run the bash shell

docker container run -it ubuntu /bin/bash

Oh yea, the -it runs an interactive terminal. It attaches the containers terminal to your terminal.
Read 15 tweets
Feb 11
Three facts you need to realize about data science:

1. Learning is not enough
2. You need experience to get a job
3. You need principles for working

#datascience #66daysofdata
1/ Learning is not enough

A hiring manager isn’t going to be able to open your head, peek inside your brain, and verify if you know how to do this thing or that, or how well you understand this, that or the other.

That’s why you need to do a project.
2/ You need experience to get a job

But that doesn’t mean you need a job to get experience.

Data is everywhere.

You don’t need to be in a job at a company to get access to data.

If you know where to look and how to search for it, you’ll quickly see that it is everywhere.
Read 6 tweets
Dec 26, 2021
Are you a new online writer?

Me, too.

This morning I binge reading @dickiebush & @Nicolascole77's email course - "How To Start Writing Online".

Here are EIGHT lessons I learned and how YOU can implement them to write your first thread!

Let's go! 🧵
1/ Start small

Prioritize 280 characters before investing time on longer pieces.

Why?

Data and feedback.

Write about X and readers fall off? --> Good. Don't spend more time on that.

Write about Y and readers go crazy? --> Great! Invest time and expand on that idea.
2/ 3 steps for becoming an idea machine

Finding yourself out of ideas?

Then follow these three steps...

Step 1: Pick a direction (4A framework: actionable, aspirational, analytical, or anthropological?)

Step 2: Pick a proven approach

Step 3: Establish your credibility Image
Read 11 tweets
Dec 21, 2021
There are only ten days left in 2021.

Did you learn anything new?

Here are six of the biggest lessons I've learned this year from @jockowillink, @TomBilyeu, @ScottAdamsSays, @naval, @nntaleb, and @jaltucher.

Let's get into it 🧵
1/ Say good when things are bad

This one I learned from @jockowillink.

You will face failures, setbacks, and defeats 100x over.

When that happens, say "Good".

This is your opportunity to figure out a solution.

And it doesn't matter if you don't know the answer, because...
2/ You can learn new skills at any time in any area.

This one I learned from @TomBilyeu.

No matter what you're capable of right now, believe you can learn and improve.

It's the only belief that matters.

No need to be the best in the thing you're learning, because...
Read 8 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

Don't want to be a Premium member but still want to support us?

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

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(