Docker: A Beginners Guide

I am a full stack developer. Currently doing some project on nextjs / nodejs
Working as SDE 3 in Netomi Here’s my Resume: https://resume.devaman.dev
Search for a command to run...

I am a full stack developer. Currently doing some project on nextjs / nodejs
Working as SDE 3 in Netomi Here’s my Resume: https://resume.devaman.dev
You provided a great insight thorough the docker ecosystem, which I believe is great. The one thing I’m always disappointed about is that you stopped right where it becomes useful. Of course you can run a container you just built, but who does that nowadays? From my experience, there’s tons of tutorials on how to run a container and how it works. Where all of these (and this one too) fails is putting things together, using docker-compose, or pointing the newbie towards the right way. I’ve seen countless developers being stuck at this point, using ‘docker run’ commands from a makefile, being stuck at the point you finished the article at. Please, as an experienced user, at least provide a link to where to move from this point to your readers. Thanks! Wod
And of course, as an experienced developer, I turn the ashtray on my head for being too lazy to write such followup by myself. T’was just an opinion, as I like your style and I’d like to hear more from you. Cheers, Wod
Thanks for your feedback. I’ll definitely write more about docker. This article was just a insight about docker for a beginner. Part 2 will come soon😌
Recently i worked on Vue 3 migration. Migrating a Vue 2 application to Vue 3 is not just a dependency upgrade. The real work is in updating the application bootstrap, router, store, plugins, component

19/May/2023 While using mini-css-extract-plugin with vuejs and webpack 5, I was getting problem related to CSS priority. Scoped Css/Scss was not getting higher priority than common css. To resolve this issue we had to use oneof rule. In resourceQuery...

Hello everyone! I recently had the opportunity to work with AWS IoT to fetch real-time data. During the migration from Webpack 4 to Webpack 5, we encountered some issues with the aws-iot-device-sdk. While building our project, we encountered errors r...

Hey everyone , Webpack has released some new cool feature called module federation. Module Federation allows a JavaScript application to dynamically load code from another application and in the process, share dependencies. If an application consumi...

In this post I will tell you about on how to submit a pull request to the organization on which you are thinking to contribute. Now lets gets started with the steps... 1) Step 1 : Fork the repo. 2) Step 2 : Clone the repository.Open the terminal and ...

Amit Chambial Blog.
14 posts
Full Stack Developer and a maker. See my portfolio at https://portfolio.devaman.dev
Docker is a computer program that performs operating-system-level virtualisation, also known as "containerization"

Docker uses all the operating system resources (file system,process trees,user) and carve them in virtual OS called container.
In computing, a namespace is a set of symbols that are used to organize objects of various kinds, so that these objects may be referred to by name. A namespace ensures that all the identifiers within it have unique names so that they can be easily identified.

It limits the resources that can be used by the container. eg out of 4GB ram of host, container can only use 1% of it.



dockerd - The Docker daemon itself. The highest level component in your list and also the only 'Docker' product listed. Provides all the nice UX features of Docker.
(docker-)containerd - Also a daemon, listening on a Unix socket, exposes gRPC endpoints. Handles all the low-level container management tasks, storage, image distribution, network attachment, etc...
(docker-)containerd-ctr - A lightweight CLI to directly communicate with containerd. Think of it as how 'docker' is to 'dockerd'.
(docker-)runc - A lightweight binary for actually running containers. Deals with the low-level interfacing with Linux capabilities like cgroups, namespaces, etc...
(docker-)containerd-shim - After runC actually runs the container, it exits (allowing us to not have any long-running processes responsible for our containers). The shim is the component which sits between containerd and runc to facilitate this.

A registry is a storage and content delivery system, holding named Docker images, available in different tagged versions.
Registry / Repo / Image (tag)
eg
Docker.io / redis / latest



Output:


FROM alpine
RUN apk add -update nodejs nodejs-npm
COPY ./src
WORKDIR /src
RUN npm install
EXPOSE 8080
ENTRYPOINT ["node","./app.js"]
First build the image
docker image build -t <tag-name>
eg docker build -t amit/nginx
run docker image ls to see if it is built.
Running it as container.
docker container run -d --name mynginx -p 8080:80 amit/nginx