<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vikky Omkar</title>
    <description>The latest articles on DEV Community by Vikky Omkar (@vikkyomkar).</description>
    <link>https://dev.to/vikkyomkar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F459258%2F36deaed1-aeb3-40e4-957c-4b5a00b6edc7.jpeg</url>
      <title>DEV Community: Vikky Omkar</title>
      <link>https://dev.to/vikkyomkar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vikkyomkar"/>
    <language>en</language>
    <item>
      <title>Scenario Based Docker Interview Questions | Part-4 </title>
      <dc:creator>Vikky Omkar</dc:creator>
      <pubDate>Mon, 12 Oct 2020 03:09:28 +0000</pubDate>
      <link>https://dev.to/vikkyomkar/scenario-based-docker-interview-questions-part-4-4g1m</link>
      <guid>https://dev.to/vikkyomkar/scenario-based-docker-interview-questions-part-4-4g1m</guid>
      <description>&lt;p&gt;Hey There,&lt;/p&gt;

&lt;p&gt;Here is the 4th video on “Scenario based Docker Interview Questions”&lt;/p&gt;

&lt;p&gt;Following questions are addressed in this video:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;I have a requirement to copy token/config file inside a container but can’t use docker cmd for that. Is there any alternate way to achieve it ?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;“I can run any linux flavour container on my host as docker engine makes use of linux kernel features for containerization”&lt;br&gt;
Do you support this statement ? If yes then prove.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is it possible to&lt;br&gt;
pull/push Image, run/stop other docker containers from inside a container ?&lt;br&gt;
or&lt;br&gt;
talk to host docker daemon from inside a container ?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stopping a running container using docker stop is slow as compared to docker kill but still its advised for a good user experience why ?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I have an app and a db container running on a host. How can these 2 containers talk to each other ?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/__5bNusS7_Y"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>docker</category>
      <category>kubernetes</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>Popular Docker Interview Questions with RealTime Scenarios for Beginners | Part 3</title>
      <dc:creator>Vikky Omkar</dc:creator>
      <pubDate>Sun, 04 Oct 2020 10:08:22 +0000</pubDate>
      <link>https://dev.to/vikkyomkar/popular-docker-interview-questions-with-realtime-scenarios-for-beginners-part-3-ji3</link>
      <guid>https://dev.to/vikkyomkar/popular-docker-interview-questions-with-realtime-scenarios-for-beginners-part-3-ji3</guid>
      <description>&lt;p&gt;Following questions are addressed in this video:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Are the container logs stored inside a container or in host server ? And what is the location of container logs ?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;10+ containers are running on my host server. All these containers stop on server reboot or docker engine restart which requires a manually container start. Is there any way to auto restart the containers in this scenario ?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Developers create multiple test containers in dev server in a day which consumes lot of disk space and manual cleanup is required. Is there any way to automate this cleanup ?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is it possible to use restart policy and –rm flag together when starting a container ?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How does Docker really work behind the scenes?&lt;br&gt;&lt;br&gt;
                     OR&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Where namespace, cgroups and UnionFS is used in docker ?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I want to clone a github repo but I don’t have git utility installed in my system ,although docker is running in my system and git image is also available. So considering the scenario, how can I clone the repo now ?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/v9yu1uIYuoA"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>linux</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>Popular Docker Interview Questions with RealTime Scenarios for Beginners | Part 2</title>
      <dc:creator>Vikky Omkar</dc:creator>
      <pubDate>Tue, 29 Sep 2020 06:52:34 +0000</pubDate>
      <link>https://dev.to/vikkyomkar/popular-docker-interview-questions-with-realtime-scenarios-for-beginners-part-2-1of2</link>
      <guid>https://dev.to/vikkyomkar/popular-docker-interview-questions-with-realtime-scenarios-for-beginners-part-2-1of2</guid>
      <description>&lt;h2&gt;
  
  
  Following questions are addressed here:-
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Suppose host server has 2 GB space and your image size is 500MB than is it possible to run more than 4 containers of this image on the host ?&lt;/li&gt;
&lt;li&gt;Docker is written in which language and which docker version are you using ?&lt;/li&gt;
&lt;li&gt;What are the different ways to create docker images ?&lt;/li&gt;
&lt;li&gt;How to search and pull any docker image in local system?&lt;/li&gt;
&lt;li&gt;How to check details about any image ?&lt;/li&gt;
&lt;li&gt;Suppose I want to pull a alpine-git image and a alpine image is already installed then will docker download a full or partial alpine-git image ?&lt;/li&gt;
&lt;li&gt;How to check details about each layer in a docker image like size , task done, timestamp ?&lt;/li&gt;
&lt;li&gt;How to remove dangling images and why is it useful?&lt;/li&gt;
&lt;li&gt;How to run a container in interactive and daemon mode ?&lt;/li&gt;
&lt;li&gt;How to check details about a container ?&lt;/li&gt;
&lt;li&gt;Is it possible to create container’s writable layer without running a docker container ?&lt;/li&gt;
&lt;li&gt;How to find size of any container’s writable layer ?&lt;/li&gt;
&lt;li&gt;How to check logs for a container ?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Checkout below video for the answers
&lt;/h3&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/z9lk2gEGacQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Feel free to share your thoughts. Also, do hit ❤️ or 🦄 if you liked the post.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>linux</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>Popular Docker Interview Questions with RealTime Scenarios for Beginners | Part 1</title>
      <dc:creator>Vikky Omkar</dc:creator>
      <pubDate>Sun, 20 Sep 2020 17:11:55 +0000</pubDate>
      <link>https://dev.to/vikkyomkar/popular-docker-interview-questions-with-realtime-scenarios-for-beginners-part-1-50d0</link>
      <guid>https://dev.to/vikkyomkar/popular-docker-interview-questions-with-realtime-scenarios-for-beginners-part-1-50d0</guid>
      <description>&lt;h3&gt;
  
  
  &lt;strong&gt;Below are the most popular docker interview questions for Beginners&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;What is Containerization ?&lt;/li&gt;
&lt;li&gt;What are the Advantages of Containerization ?&lt;/li&gt;
&lt;li&gt;What is docker ?&lt;/li&gt;
&lt;li&gt;Docker Architecture and communication &lt;/li&gt;
&lt;li&gt;Docker Registry and its types&lt;/li&gt;
&lt;li&gt;How to access public/private Registry ?&lt;/li&gt;
&lt;li&gt;Do I need to login to dockerhub to pull the images ?&lt;/li&gt;
&lt;li&gt;What is docker image ?&lt;/li&gt;
&lt;li&gt;What is docker container ?&lt;/li&gt;
&lt;li&gt;Is there any dependency b/w docker image and container ?&lt;/li&gt;
&lt;li&gt;Suppose host server has 2 GB space and your image size is 500MB than is it possible to run more than 4 containers of this image on the host ?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Checkout below video for the answers
&lt;/h3&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/-BW0Kk5Vj7o"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Feel free to share your thoughts. Also, do hit ❤️ or 🦄 if you liked the post.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>linux</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to use a Python Code as Script and Module Both ??  For Beginners</title>
      <dc:creator>Vikky Omkar</dc:creator>
      <pubDate>Tue, 15 Sep 2020 02:50:57 +0000</pubDate>
      <link>https://dev.to/vikkyomkar/how-to-use-a-python-code-as-script-and-module-both-for-beginners-7lf</link>
      <guid>https://dev.to/vikkyomkar/how-to-use-a-python-code-as-script-and-module-both-for-beginners-7lf</guid>
      <description>&lt;p&gt;Checkout the Video for explanation : &lt;iframe width="710" height="399" src="https://www.youtube.com/embed/MIkYh4Ai4To"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>python</category>
      <category>devops</category>
      <category>beginners</category>
      <category>linux</category>
    </item>
    <item>
      <title>3 ways to find if a number is Odd/Even in Python</title>
      <dc:creator>Vikky Omkar</dc:creator>
      <pubDate>Thu, 27 Aug 2020 15:16:58 +0000</pubDate>
      <link>https://dev.to/vikkyomkar/3-ways-to-find-if-a-number-is-odd-even-in-python-1ao7</link>
      <guid>https://dev.to/vikkyomkar/3-ways-to-find-if-a-number-is-odd-even-in-python-1ao7</guid>
      <description>&lt;h3&gt;
  
  
  Solution #1
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def find(num):
    # code logic here
    if num%2 == 0:
        numtype="even"
    else:
        numtype = "odd"
    return numtype

num = int(input('Enter the number: '))  # 1. take your input
numtype = find(num)                     # 2. call the find function
print('Given number is',numtype).       # 3. print if the number is even or odd
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  Output:
&lt;/h4&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;coder# python challenge07.py 
Enter the number: 5
Given number is odd
coder# python challenge07.py 
Enter the number: 8
Given number is even
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  Explanation:-
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;input() function is used to take user input&lt;/li&gt;
&lt;li&gt;find() function is called to to check if a number is off/even. This function returns numtype as odd/even&lt;/li&gt;
&lt;li&gt;At last, print if the given number is odd/even&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Solution #2
&lt;/h3&gt;

&lt;p&gt;Avoid usage of else block by assigning a default value (odd) to numtype&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def find(num):
    # code logic here
    numtype = "odd"
    if num%2 == 0:
        numtype="even"
    return numtype

num = int(input('Enter the number: '))      # take your input
numtype = find(num)                         # call the find function
print('Given number is',numtype)            # print if the number is even or odd
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  Output:
&lt;/h4&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;coder# python challenge07.py 
Enter the number: 5
Given number is odd
coder# python challenge07.py 
Enter the number: 8
Given number is even
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Solution #3
&lt;/h3&gt;

&lt;p&gt;directly return numtype&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def find(num):
    # code logic here
    if num%2 == 0:
        return "even"
    return "odd"

num = int(input('Enter the number: '))      # take your input
numtype = find(num)                         # call the find function
print('Given number is',numtype)            # print if the number is even or odd
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  Output:
&lt;/h4&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;coder# python challenge07.py 
Enter the number: 5
Given number is odd
coder# python challenge07.py 
Enter the number: 8
Given number is even
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Bonus
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;numtype = num%2 == 0 and "even" or "odd"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Find the video explanation also&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/LC6zEHq4Pnw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>python</category>
      <category>devops</category>
      <category>coding</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
