Skip to main content

Devops - Docker Compose Part 1

1. version –  Version is the first attribute which your specify in your docker compose file. At the time of writing this post the latest version was 3.7 and which was introduced with docker engine 18.06.0+ version. If you will not specify the version you will probably get the error when you will try to run docker-compose up. Example – version: ‘3.7’

2. services – This is the second attribute which we specify after version in our docker-compose.yaml file. It is also a mandatory attribute otherwise you will encounter an error. Under services attribute we specify our docker containers. You can specify any no. of docker containers inside this. 

3. Service Name – As we discussed under services attribute we specify our services name. For example myql: followed by colon(mandatory). Then inside our service we further add our different service attributes like container_name, networks, depends_on, volumes etc. 
Example1 – mysql:
Example 2 – spring:
Example 3 – tomcat:

4. container_name – In docker images run inside a container and every container has a container ID and container name. So we can use this attribute to actually name our container. 
Example –   container_name:  my_mysql

5. image – This is very important attribute. Here you specify the name of your image which you want to pull. This attribute in docker-compose.yaml file is equivalent to  docker pull mysql command.

Comments

Popular posts from this blog

Automation - Update Naukri Profile Using Selenium

Recently one of my friend came to me with a problem. He is looking out for new job but he feels quite boring to update  his profile on daily basis. As some people says updating profile in the morning gives you more calls as it keeps the newly updated profile on top (Although i don’t know whether naukri works this way or not 😀 ). As i was more interested to solve his problem.  After listening his problem i came to solution that instead of updating it manually lets make this job automatic. And it is quite interesting how we can automate our daily boring task with automation. Another day i came with the solution . And the solution was to make it automatic using selenium (Those who are not aware about selenium do check this link) In short, Selenium is a Testing automation Framework. And it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should) also be automated as well....

Windows Run Commands List

Accessibility Controls – access.cpl Add Hardware Wizard – hdwwiz.cpl Add/Remove Programs – appwiz.cpl Administrative Tools control – admintools Automatic Updates – wuaucpl.cpl Bluetooth Transfer Wizard – fsquirt Calculator – calc Certificate Manager – certmgr.msc Character Map – charmap Check Disk Utility – chkdsk Clipboard Viewer – clipbrd Command Prompt – cmd Component Services – dcomcnfg Computer Management – compmgmt.msc Device Manager – devmgmt.msc Direct X Control Panel (If Installed)  – directx.cpl Direct X Troubleshooter – dxdiag Disk Cleanup Utility – cleanmgr Disk Defragment – dfrg.msc Disk Management – diskmgmt.msc Disk Partition Manager – diskpart Display Properties – control desktop Display Properties – desk.cpl Display Properties (w/Appearance Tab Preselected) – control color Dr. Watson System Troubleshooting Utility – drwtsn...

OpenCV - Image Filters

Hello Guys, In this tutorial, I will discuss the color map in OpenCV. Color Map is used to show different color temperatures. And this can also be used to generate some cool image filters.  OpenCV comes with thirteen built-in color maps. So in this tutorial, I will show you how to use color maps.  Let’s get started List of Color Maps COLORMAP_AUTUMN COLORMAP_BONE COLORMAP_JET COLORMAP_WINTER COLORMAP_RAINBOW COLORMAP_OCEAN COLORMAP_SUMMER COLORMAP_SPRING COLORMAP_COOL COLORMAP_HSV COLORMAP_PINK COLORMAP_HOT COLORMAP_PARULA To apply color map first we need to convert an image to grayscale. So I will use  img = cv.imread("nature.jpg",cv.IMREAD_GRAYSCALE) If you are not aware of this function then please check my previous tutorial  http://techievaibhav.in/2019/01/10/reading-an-image-using-opencv/ To apply color maps, OpenCV comes with a function called applyColorMap() . This function takes two parameters. Gray Scale image Color Map Autumn Bone Cool Hot HSV Jet Ocean Parula Pink ...