Optimise your 🐬 docker image by 95% not just in size but also in security.
1. 𝗨𝘀𝗲 𝗠𝘂𝗹𝘁𝗶-𝗦𝘁𝗮𝗴𝗲 𝗯𝘂𝗶𝗹𝗱𝘀.
Stage 1 will build an artifact consisting of all the required libraries & dependencies. Stage 2 will use a slim/scratch base image and copy only the artifact from Stage 1 resulting in up to 95% less image size.
2. 𝗣𝗶𝗰𝗸 𝘀𝗹𝗶𝗺 𝘃𝗲𝗿𝗶𝗳𝗶𝗲𝗱 𝗯𝗮𝘀𝗲 𝗶𝗺𝗮𝗴𝗲𝘀.
Slim images don’t have any unnecessary components like shell utilities, libraries, or metadata. It will reduce the size and the attack surface area.
3. 𝗕𝗲𝗻𝗲𝗳𝗶𝘁 𝗳𝗿𝗼𝗺 𝘁𝗵𝗲 𝗟𝗮𝘆𝗲𝗿 𝗖𝗮𝗰𝗵𝗶𝗻𝗴.
Always order the instructions from least changing to most changing i.e. use COPY instruction much later in the Dockerfile.
4. 𝗨𝘀𝗲 𝗹𝗲𝘀𝘀 𝗹𝗮𝘆𝗲𝗿𝘀.
Commands like RUN COPY ADD create layers. Fewer layers = Small Size = Faster Build Times.
5. 𝗡𝗲𝘃𝗲𝗿 𝗿𝘂𝗻 𝗶𝗺𝗮𝗴𝗲𝘀 𝗮𝘀 𝘁𝗵𝗲 𝗿𝗼𝗼𝘁 𝘂𝘀𝗲𝗿.
By default, every image runs with root privileges, so make sure you run the image as a non-pseudo user[may break your application, some processes need root privileges]
6. 𝗦𝗰𝗮𝗻 𝗶𝗺𝗮𝗴𝗲𝘀 𝗳𝗼𝗿 𝘃𝘂𝗹𝗻𝗲𝗿𝗮𝗯𝗶𝗹𝗶𝘁𝗶𝗲𝘀 using tools like Trivy & Scout.
Avoid CRITICAL and HIGH vulnerabilities.
📱 𝗙𝗼𝗹𝗹𝗼𝘄 @prodevopsguy 𝐟𝐨𝐫 𝐦𝐨𝐫𝐞 𝐬𝐮𝐜𝐡 𝐜𝐨𝐧𝐭𝐞𝐧𝐭 𝐚𝐫𝐨𝐮𝐧𝐝 𝐜𝐥𝐨𝐮𝐝 & 𝐃𝐞𝐯𝐎𝐩𝐬!!! // 𝐉𝐨𝐢𝐧 𝐟𝐨𝐫 𝐃𝐞𝐯𝐎𝐩𝐬 𝐃𝐎𝐂𝐬: @devopsdocs
1. 𝗨𝘀𝗲 𝗠𝘂𝗹𝘁𝗶-𝗦𝘁𝗮𝗴𝗲 𝗯𝘂𝗶𝗹𝗱𝘀.
Stage 1 will build an artifact consisting of all the required libraries & dependencies. Stage 2 will use a slim/scratch base image and copy only the artifact from Stage 1 resulting in up to 95% less image size.
2. 𝗣𝗶𝗰𝗸 𝘀𝗹𝗶𝗺 𝘃𝗲𝗿𝗶𝗳𝗶𝗲𝗱 𝗯𝗮𝘀𝗲 𝗶𝗺𝗮𝗴𝗲𝘀.
Slim images don’t have any unnecessary components like shell utilities, libraries, or metadata. It will reduce the size and the attack surface area.
3. 𝗕𝗲𝗻𝗲𝗳𝗶𝘁 𝗳𝗿𝗼𝗺 𝘁𝗵𝗲 𝗟𝗮𝘆𝗲𝗿 𝗖𝗮𝗰𝗵𝗶𝗻𝗴.
Always order the instructions from least changing to most changing i.e. use COPY instruction much later in the Dockerfile.
4. 𝗨𝘀𝗲 𝗹𝗲𝘀𝘀 𝗹𝗮𝘆𝗲𝗿𝘀.
Commands like RUN COPY ADD create layers. Fewer layers = Small Size = Faster Build Times.
5. 𝗡𝗲𝘃𝗲𝗿 𝗿𝘂𝗻 𝗶𝗺𝗮𝗴𝗲𝘀 𝗮𝘀 𝘁𝗵𝗲 𝗿𝗼𝗼𝘁 𝘂𝘀𝗲𝗿.
By default, every image runs with root privileges, so make sure you run the image as a non-pseudo user[may break your application, some processes need root privileges]
6. 𝗦𝗰𝗮𝗻 𝗶𝗺𝗮𝗴𝗲𝘀 𝗳𝗼𝗿 𝘃𝘂𝗹𝗻𝗲𝗿𝗮𝗯𝗶𝗹𝗶𝘁𝗶𝗲𝘀 using tools like Trivy & Scout.
Avoid CRITICAL and HIGH vulnerabilities.
Tip: To see individual layers of an image use tools like Dive
Please open Telegram to view this post
VIEW IN TELEGRAM
Azure Cloud Bootcamp 2024 with projects live now 🔥
Claim/Register for all benifits🐦 (Free Azure DevOps Course Included) 🆓
⚡️ Bootcamp Syllabus: https://blog.prodevopsguy.xyz/complete-azure-bootcamp-2024-with-azure-devops-your-ultimate-course-to-mastering-the-cloud
⚡️ Purchase link: https://topmate.io/prodevopsguytech/1181373
- Complete Azure Cloud
- Free real time projects
- Life time access to content
- Unlimited downloads, offline viewing
- 24/7 Support available
⚡️ 𝗙𝗼𝗹𝗹𝗼𝘄 @prodevopsguy 𝐟𝐨𝐫 𝐦𝐨𝐫𝐞 𝐬𝐮𝐜𝐡 𝐜𝐨𝐧𝐭𝐞𝐧𝐭 𝐚𝐫𝐨𝐮𝐧𝐝 𝐜𝐥𝐨𝐮𝐝 & 𝐃𝐞𝐯𝐎𝐩𝐬!!! // 𝐉𝐨𝐢𝐧 𝐟𝐨𝐫 𝐃𝐞𝐯𝐎𝐩𝐬 𝐃𝐎𝐂𝐬: @devopsdocs
Claim/Register for all benifits
- Complete Azure Cloud
- Free real time projects
- Life time access to content
- Unlimited downloads, offline viewing
- 24/7 Support available
Please open Telegram to view this post
VIEW IN TELEGRAM
I've just published a comprehensive collection of DevOps Cheatsheets that cover a wide range of tools and topics to help you streamline your workflows and enhance your skills. Whether you're a beginner or looking to deepen your knowledge, these Cheatsheets have got you covered!
- Containerization: Docker, Kubernetes, Helm, Podman
- CI/CD: Jenkins, GitHub Actions, GitLab CI, CircleCI
- Monitoring: Prometheus, Grafana, ELK Stack, Nagios
- Security: Trivy, SonarQube, AquaSec, HashiCorp Vault
- Cloud: AWS, Azure, GCP, Terraform
- DevOps Engineers: Get quick access to the tools you use every day.
- Sysadmins: Simplify operations with easy-to-follow guides.
- Developers: Understand the infrastructure behind your applications.
- DevOps Newcomers: Learn the basics and avoid common pitfalls with our beginner-friendly Cheatsheets.
Explore detailed guides, from basic concepts to advanced techniques, and take your DevOps expertise to the next level!🌟
Feel free to dive in, contribute, and share your thoughts. Happy DevOps-ing!
Please open Telegram to view this post
VIEW IN TELEGRAM
Here are some excellent DevOps projects to enhance your skills and gain practical experience:
GeeksforGeeks: https://www.geeksforgeeks.org/devops-projects/
DevOpsCube: https://devopscube.com/devops-projects/
GitHub: https://github.com/NotHarshhaa/DevOps-Projects
By working on these projects, you'll gain practical experience with essential DevOps tools and technologies, and develop the skills needed to succeed in a DevOps role.
Please open Telegram to view this post
VIEW IN TELEGRAM
DEV Community
Serverless CI/CD: How to Build a Pipeline Without Servers
In the evolving world of DevOps, automation is the key to efficiency. Continuous Integration and...
💡 This is a must-read for every DevOps engineer looking to streamline their workflow and embrace the power of serverless technology. Don't miss out!
Please open Telegram to view this post
VIEW IN TELEGRAM
𝐓𝐨𝐩 𝐔𝐬𝐞𝐝 𝐃𝐨𝐜𝐤𝐞𝐫 𝐂𝐨𝐦𝐦𝐚𝐧𝐝𝐬 🐋
🐳 𝐃𝐨𝐜𝐤𝐞𝐫 𝐁𝐚𝐬𝐢𝐜𝐬:
•🏁
•📦
•🔍
•🗑
•🏗
•🛑
•♻️
•💡
🐋 𝐃𝐨𝐜𝐤𝐞𝐫 𝐍𝐞𝐭𝐰𝐨𝐫𝐤𝐢𝐧𝐠:
•🌐
•🔗
•🛠
•🔄
📁 𝐃𝐨𝐜𝐤𝐞𝐫 𝐕𝐨𝐥𝐮𝐦𝐞𝐬:
•📂
•🔌
•🔄
•🗑
⚙️ 𝐃𝐨𝐜𝐤𝐞𝐫 𝐂𝐨𝐦𝐩𝐨𝐬𝐞:
•📋
•🗄
•🔧
•📊
•🔄
•📈
🔵 𝗙𝗼𝗹𝗹𝗼𝘄 @prodevopsguy 𝗳𝗼𝗿 𝗺𝗼𝗿𝗲 𝘀𝘂𝗰𝗵 𝗰𝗼𝗻𝘁𝗲𝗻𝘁 𝗮𝗿𝗼𝘂𝗻𝗱 𝗰𝗹𝗼𝘂𝗱 & 𝗗𝗲𝘃𝗢𝗽𝘀!!!
•
docker run: Run a container from an image.•
docker build: Build an image from a Dockerfile.•
docker images: List all images on the system.•
docker rmi: Remove one or more images.•
docker-compose up: Start services defined in a Compose file.•
docker stop: Stop a running container.•
docker rm: Remove one or more containers.•
docker ps: List running containers.•
docker network create: Create a network.•
docker network connect: Connect a container to a network.•
docker network inspect: Inspect a network.•
docker network disconnect: Disconnect a container from a network.•
docker volume create: Create a volume.•
docker volume ls: List volumes.•
docker volume inspect: Inspect a volume.•
docker volume rm: Remove one or more volumes.•
docker-compose up: Start services defined in a Compose file.•
docker-compose down: Stop and remove services defined in a Compose file.•
docker-compose build: Build or rebuild services.•
docker-compose logs: View output logs from services.•
docker-compose restart: Restart services.•
docker-compose scale: Scale services to a specified number.Please open Telegram to view this post
VIEW IN TELEGRAM
DevOps & Cloud (AWS, AZURE, GCP) Tech Free Learning
Photo
1. What is DevOps and why is it important?
2. Explain the difference between DevOps and Agile.
3. What are the key benefits of implementing DevOps?
4. What are the main components of a DevOps pipeline?
5. What is the role of CI/CD in DevOps?
6. How do you approach infrastructure as code (IaC)?
7. What are some common DevOps tools and their uses?
8. Explain the concept of "Shift Left" in DevOps.
9. What is the difference between CI & CD?
10. How do you handle version control in a DevOps environment?
11. What is a CI/CD pipeline?
12. How do you implement a CI/CD pipeline from scratch?
13. What are the common stages of a CI/CD pipeline?
14. How do you manage secrets in a CI/CD pipeline?
15. Explain the importance of automated testing in CI/CD.
16. How do you ensure that deployments are zero-downtime?
17. What tools do you use for CI/CD?
18. How do you handle rollbacks in CI/CD?
19. What is the purpose of artifact repositories in CI/CD?
20. How do you manage dependencies in a CI/CD pipeline?
21. What is Docker, and how does it work?
22. How do containers differ from virtual machines?
23. Explain the concept of Docker Compose.
24. What is Kubernetes, and why is it used?
25. How do you deploy a Kubernetes cluster?
26. What are Kubernetes Pods, and how do they work?
27. How do you manage Kubernetes secrets?
28. What are Kubernetes Ingress and Services?
29. How do you monitor and scale a Kubernetes cluster?
30. Explain the concept of service mesh in Kubernetes.
31. What is the difference between IaaS, PaaS, and SaaS?
32. Explain the concept of cloud formation and infrastructure as code.
33. How do you implement high availability in AWS?
34. What are the benefits of using cloud-native tools?
35. How do you manage cost optimization in cloud platforms?
36. Explain the concept of auto-scaling in AWS.
37. How do you secure a cloud environment?
38. What is the importance of tagging resources in the cloud?
39. How do you handle disaster recovery in the cloud?
40. What are the different storage options available in AWS?
41. What is the importance of monitoring in a DevOps environment?
42. How do you set up monitoring for your applications?
43. What tools do you use for monitoring and logging?
44. Explain the concept of observability.
45. How do you handle log aggregation and analysis?
46. What is the difference between metrics and logs?
47. How do you monitor the performance of a microservices architecture?
48. What is the role of alerting in monitoring?
49. How do you ensure the security of monitoring data?
50. What is the importance of tracing in a distributed system?
51. What is Infrastructure as Code (IaC)?
52. How do you implement IaC in your environment?
53. What tools do you use for IaC?
54. Explain the concept of immutable infrastructure.
55. How do you handle configuration management in IaC?
56. What are the challenges of implementing IaC?
57. How do you version control infrastructure code?
58. What is the importance of idempotency in IaC?
59. How do you test and validate IaC scripts?
60. How do you handle secrets management in IaC?
61. Why is automation important in DevOps?
62. How do you approach task automation in your projects?
63. What scripting languages do you use for automation?
64. How do you automate server provisioning and configuration?
65. What is the role of Ansible in automation?
66. How do you handle automation in a multi-cloud environment?
67. What are the benefits of using Terraform for automation?
68. How do you ensure the security of automation scripts?
69. How do you handle errors in automated workflows?
70. What is the importance of idempotency in automation?
Please open Telegram to view this post
VIEW IN TELEGRAM
Helm is a powerful package manager for Kubernetes, making it easier to deploy and manage applications. Here’s a comprehensive list of Helm commands you should know:
1. Helm Installation
helm install <release_name> <chart>
Install a Helm chart.
2. Helm Upgrade
helm upgrade <release_name> <chart>
Upgrade a release to a new version of the chart.
3. Helm Rollback
helm rollback <release_name> <revision_number>
Rollback a release to a previous revision.
4. Helm Uninstall
helm uninstall <release_name>
Uninstall a Helm release.
5. Helm Repo Add
helm repo add <repo_name> <repo_url>
Add a new Helm repository.
6. Helm Repo Update
helm repo update
Update the Helm repository information.
7. Helm List
helm list
List all installed Helm releases.
8. Helm Search Repo
helm search repo <keyword>
Search for charts in the repositories.
9. Helm Show Values
helm show values <chart>
Show the default values of a chart.
10. Helm Template
helm template <release_name> <chart>
Render chart templates locally and display the output.
11. Helm Package
helm package <chart_path>
Package a chart into a versioned chart archive file.
12. Helm Lint
helm lint <chart_path>
Run a series of tests to verify the chart is well-formed.
13. Helm Dependency Update
helm dependency update <chart_path>
Update dependencies for a chart.
14. Helm Get All
helm get all <release_name>
Get all information about a release.
15. Helm History
helm history <release_name>
Fetch release history.
16. Helm Test
helm test <release_name>
Run tests for a release.
Stay efficient and streamline your Kubernetes deployments with these Helm commands!
Please open Telegram to view this post
VIEW IN TELEGRAM
Today, we'll break down this journey into 5 key stages:
𝟭. 𝗕𝘂𝘀𝗶𝗻𝗲𝘀𝘀 𝗨𝗻𝗱𝗲𝗿𝘀𝘁𝗮𝗻𝗱𝗶𝗻𝗴 & 𝗗𝗮𝘁𝗮 𝗔𝗰𝗾𝘂𝗶𝘀𝗶𝘁𝗶𝗼𝗻:
𝟮. 𝗗𝗮𝘁𝗮 𝗣𝗿𝗲𝗽𝗮𝗿𝗮𝘁𝗶𝗼𝗻 & 𝗙𝗲𝗮𝘁𝘂𝗿𝗲 𝗘𝗻𝗴𝗶𝗻𝗲𝗲𝗿𝗶𝗻𝗴:
𝟯. 𝗠𝗼𝗱𝗲𝗹 𝗧𝗿𝗮𝗶𝗻𝗶𝗻𝗴 & 𝗘𝘅𝗽𝗲𝗿𝗶𝗺𝗲𝗻𝘁𝗮𝘁𝗶𝗼𝗻:
𝟰. 𝗗𝗲𝗽𝗹𝗼𝘆𝗺𝗲𝗻𝘁 & 𝗠𝗼𝗻𝗶𝘁𝗼𝗿𝗶𝗻𝗴:
𝟱. 𝗙𝗲𝗲𝗱𝗯𝗮𝗰𝗸 𝗟𝗼𝗼𝗽 & 𝗖𝗼𝗻𝘁𝗶𝗻𝘂𝗼𝘂𝘀 𝗜𝗺𝗽𝗿𝗼𝘃𝗲𝗺𝗲𝗻𝘁:
Data scientists, engineers, business stakeholders, and domain experts all play crucial roles in bringing successful ML projects to life.
By following these stages and fostering a collaborative culture, you can unlock the true potential of ML and turn your business questions into real-world impact.
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
DEV Community
DevSecOps Project: "Secure Full-Stack Node.js Web Application Deployment with Jenkins, Docker, Kubernetes, and HashiCorp Vault"
Table of Contents Project Overview Prerequisites Phase 1: Infrastructure Setup 1.1...
Check out DevSecOps Project: "Secure Full-Stack Node.js Deployment with Jenkins, Docker, Kubernetes, and HashiCorp Vault"!
- Set up Kubernetes on AWS EKS
- Containerize and deploy a Node.js app
- Automate CI/CD with Jenkins
- Secure secrets with HashiCorp Vault
- Implement Kubernetes security best practices
Perfect for those looking to master DevSecOps with hands-on examples and best practices.💡
Please open Telegram to view this post
VIEW IN TELEGRAM
A Kubernetes End-to-End (E2E) project for deploying a 2048 game app on Amazon Elastic Kubernetes Service (EKS) involves setting up, deploying, and managing the popular 2048 game application on a Kubernetes cluster running on AWS EKS. This project aims to demonstrate how to containerize a web application, deploy it on EKS, manage the cluster, and expose the application to users.
Please open Telegram to view this post
VIEW IN TELEGRAM
- All AWS Content
- AWS Realtime scenarios
- All AWS Exercises with solutions
- No More AWS PDFs needed
- Easy to Learn from anywhere
- Detailed Explanation guide
- All AWS services for DevOps Engineer
Please open Telegram to view this post
VIEW IN TELEGRAM
- All Git/GitHub Content with use cases
- Git Realtime scenarios
- All Git/GitHub Exercises with solutions
- No More Git PDFs needed
- Easy to Learn from anywhere
- Detailed Explanation guide
- All Git/GitHub Branching Strategies for DevOps guy
Please open Telegram to view this post
VIEW IN TELEGRAM
- Comprehensive Terraform Content
- Real-world Infrastructure Automation Scenarios
- Complete Terraform Exercises with Solutions
- No Need for Terraform PDFs Anymore
- Learn Terraform Anytime, Anywhere
- Detailed Explanations & Step-by-Step Guides
- All Terraform Modules and Workflows for DevOps Engineers
Please open Telegram to view this post
VIEW IN TELEGRAM
Both commands aim to upgrade your Kubernetes cluster and node groups with almost zero downtime.
The cordon command is used to inform the cluster not to schedule any new pod on the nodes, and other/existing pods should be running without downtime or disruption.
The drain command is used to evict all the pods from the particular node group and stop pods from scheduling on the nodes. Drain command is majorly used for the maintenance of the particular node groups.
Please open Telegram to view this post
VIEW IN TELEGRAM
DEV Community
Azure DevOps Zero to Hero Series
Introduction Welcome to the Azure DevOps Zero to Hero Series! This comprehensive series is...
Hey everyone!
1. Introduction to Azure DevOps
- Understanding DevOps and its importance
- Overview of Azure DevOps services
- Setting up your Azure DevOps environment
2. Azure Boards and Agile Project Management
- Managing work items with Azure Boards
- Implementing Agile, Scrum, and Kanban processes
- Customizing dashboards and queries
3. Mastering Git and Source Control
- Introduction to Git and Azure Repos
- Branching, merging, and pull requests
- Managing repositories and code reviews
4. Build and Release Pipelines
- Creating and configuring build pipelines
- Continuous Integration (CI) and Continuous Deployment (CD)
- Using Azure Pipelines for automated deployments
5. Azure Artifacts and Test Plans
- Managing packages with Azure Artifacts
- Setting up and running test plans
- Ensuring code quality and compliance
- Hands-On Demos: Each article includes practical demos to help you apply what you learn.
- Real-World Projects: Work on real projects to gain practical experience.
- Community Support: Join our community discussions and collaborate with fellow learners.
Don't miss out on this opportunity to become an Azure DevOps expert! Whether you're a beginner or looking to enhance your skills, this series has something for everyone.
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from DevOps & Cloud (AWS, AZURE, GCP) Tech Free Learning
Here are the most widely used tools in the industry along with their official documentation:
1. Git: https://git-scm.com/docs
2. GitHub: https://docs.github.com/en
3. Bitbucket: https://lnkd.in/dA2PcM_w
1. Service Now: https://lnkd.in/d69yubJF
2. Jira: https://lnkd.in/dD_WcXFQ
3. Trello: https://trello.com/guide
1. AWS: https://lnkd.in/dMa9XpMa
2. Azure: https://lnkd.in/dBsJtZHy
3. GCP: https://lnkd.in/d3hmN-Jr
1. Docker: https://docs.docker.com/
2. Kubernetes: https://lnkd.in/dZXfQEqW
3. Mesos: https://lnkd.in/dqzvzJhY
1. Terraform: https://lnkd.in/dM46h2_D
2. Octopus: https://octopus.com/docs
3. Heroku: https://lnkd.in/dCDuwvcj
1. Selenium: https://lnkd.in/dTnFN8bT
2. Cucumber: https://lnkd.in/dpmD4A9C
3. Postman: https://lnkd.in/d3xERi6c
1. Maven: https://lnkd.in/dfgBnrZj
2. Gradle: https://lnkd.in/dv6rQczZ
3. Ant: https://lnkd.in/dQgMsgef
1. Jenkins: https://lnkd.in/dPmA6-ff
2. TravisCI: https://lnkd.in/dxxFaK_X
3. Argo CD: https://lnkd.in/dK5eXbYi
1. Grafana: https://lnkd.in/dX5anVq9
2. Prometheus: https://lnkd.in/ddxjc9bV
Please open Telegram to view this post
VIEW IN TELEGRAM