Docker Images - Slim Image, Security, Vulnerability

  Few points need to always remember from docker images point of view 1. Docker image should be created with a specified tag instead of the ...

 Few points need to always remember from docker images point of view

1. Docker image should be created with a specified tag instead of the latest tag because the latest image is different from time to time.

For example, if you want to download an ubuntu image in a Docker file then

            FROM ubuntu     # Do not use this statement

            FROM ubuntu:18.04 # This is the correct way because it contains the 18.04 version

2. Docker image should be in minimal size which fulfills the requirement of the container which you want to run.

For example, if the requirement of the docker image gets fulfilled in the minimal version of the required docker image then use the minimal version. If the alpine docker image is sufficient instead of ubuntu's latest image then use the alpine image.

3. Docker Image should be minimal in size by creating a multistage docker file.

For example, If you want to build a java source code and deploy the war file on a tomcat server then it is better to create either multistage docker file.

4. Docker Images should pass all the vulnerability checks so that authenticated images should be used for your application.

5. Before Creating a Docker image from the Docker file it is better to use the docker linter tool to verify the steps of the Docker file.

6. Run the container with a Rootless users so that attackers will have fewer chances to hack the containers completely.

7. Use the distroless images (provided by google) if required.

8. Use Scratch images if you want to create a docker image from scratch like debian based etc.



Ansible,6,AWS,1,Azure DevOps,1,Containerization with docker,2,DevOps,2,Docker Quiz,1,Docker Swarm,1,DockerCompose,1,ELK,2,git,2,git quiz,1,Git Worksheet,1,Jira,3,Kubernetes,1,Kubernetes Quiz,5,SAST DAST Security Testing,1,SDLC Quiz,4,SonarQube,3,Splunk,2,vagrant kubernetes,1,YAML Basics,1,
DevOpsWorld: Docker Images - Slim Image, Security, Vulnerability
Docker Images - Slim Image, Security, Vulnerability
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content