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.
2/ ctrl-PQ

This is how you detach your shell from the terminal of a @Docker container.

It doesn't stop or kill the container, but leaves it up and running in the background.
3/ docker container stop

This is the command you use if you want to actually stop a @Docker container. This command will accept the container ID or the container name as it's argument.
4/ docker container ls

This will list all the @Docker containers in the running state.

Want to see all containers, even those that aren't running? Then add the -a flag to the command.
5/ docker container exec

This will run a new process inside of a running @Docker container.

It's especially useful for attaching the shell of your Docker host to a terminal inside of a running container.
For example, the following command will start a new bash shell inside of a running container and connect to it (assuming the image used to create the container includes the bash shell).

docker container exec -it <container-name or id> bash
6/ docker container start

If you want to start up a container that you previously stopped, then this is the command you want to run.

Just like the other commands we've seen, you can pass the name or ID of the @Docker container you want to start.
7/ docker container rm

This is how you delete a container.

Note that you can only delete a @Docker container if you've already stopped it.
8/ docker container inspect

This command will present all the detailed config and runtime info about your @Docker container.

Just like everything else we've seen, it accepts the container name or the container ID as arguments.
Here's a thread I did about the most useful commands for @Docker images. Be sure to bookmark it to read later, or retweet it for your network:

I write all sorts of life, career, and tech advice.

Follow me if you're interested.

In the next few weeks I'll be writing more about @Docker, @kubernetesio, data-centric AI, and MLOps
If you found this helpful and want to share it with your network (you'll look smarter and sexier if you do), then scroll back to the top and hit retweet

Huge shout out to @nigelpoulton - learned all this in his @Docker class on @EducativeInc

β€’ β€’ β€’

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 27
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.
Read 11 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!

:(