<?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: Felicity Lois</title>
    <description>The latest articles on DEV Community by Felicity Lois (@leesha_lois).</description>
    <link>https://dev.to/leesha_lois</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%2F3088809%2F5365a1ac-30f7-48a4-b085-cd8db5269e63.png</url>
      <title>DEV Community: Felicity Lois</title>
      <link>https://dev.to/leesha_lois</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/leesha_lois"/>
    <language>en</language>
    <item>
      <title>Docker in a Nutshell: Security</title>
      <dc:creator>Felicity Lois</dc:creator>
      <pubDate>Wed, 08 Oct 2025 14:51:47 +0000</pubDate>
      <link>https://dev.to/leesha_lois/docker-in-a-nutshell-security-2bjp</link>
      <guid>https://dev.to/leesha_lois/docker-in-a-nutshell-security-2bjp</guid>
      <description>&lt;p&gt;When I first started using Docker, I thought isolating apps in containers automatically made them secure. Turns out… that’s like saying your house is safe because it has walls, even though the doors are wide open.&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://dev.to/leesha_lois/docker-in-a-nutshell-containers-made-simple-2fa7"&gt;Part 1&lt;/a&gt;, we explored how Docker makes building and running containers simple and efficient. But in this post, we’ll peel back the curtain and talk about what can go wrong and how to secure your Docker environments like a pro.&lt;/p&gt;

&lt;p&gt;We’ll cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Common Docker security risks&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Best practices for securing containers and images&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Real-world security mistakes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tools for container hardening&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s dive in&lt;/p&gt;

&lt;h2&gt;
  
  
  The Docker Security Model
&lt;/h2&gt;

&lt;p&gt;Before we start talking about what can go wrong, it helps to know what Docker actually secures for you.&lt;/p&gt;

&lt;p&gt;Docker isolates processes using &lt;strong&gt;namespaces&lt;/strong&gt; and &lt;strong&gt;control groups (cgroups)&lt;/strong&gt;.&lt;br&gt;
Each container runs as if it’s its own system, but in reality, they all &lt;strong&gt;share the same kernel&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That’s both the magic and the risk.&lt;/p&gt;

&lt;p&gt;So yes, your containers are separated, but not as much as a virtual machine would be.&lt;br&gt;
If one container is compromised, clever attackers can still find ways to “jump” to others if permissions and configurations aren’t tight.&lt;/p&gt;
&lt;h2&gt;
  
  
  Common Docker Security Risks
&lt;/h2&gt;

&lt;p&gt;Here’s where things start getting interesting (and slightly terrifying).&lt;/p&gt;
&lt;h2&gt;
  
  
  Running Containers as Root
&lt;/h2&gt;

&lt;p&gt;The #1 rookie mistake.&lt;br&gt;
By default, containers often run as root. If an attacker breaks in, they’re instantly the admin inside and sometimes even outside the container.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Fix: Always specify a non-root user in your Dockerfile.&lt;/p&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;USER appuser

&lt;/code&gt;&lt;/pre&gt;

&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffop4h2r9wy8dzic1buna.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffop4h2r9wy8dzic1buna.jpg" alt="Docker Yolo Meme" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Unverified Images from Docker Hub
&lt;/h2&gt;

&lt;p&gt;“Looks legit” ≠ “is safe.”&lt;br&gt;
Anyone can publish images on Docker Hub, and malicious actors often disguise malware as popular frameworks.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Fix:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;"Only use official or verified publisher images"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Run vulnerability scans before use"&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2aenb1z4y2bww0ffl8fj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2aenb1z4y2bww0ffl8fj.png" alt="Screenshot of docker scan report highlighting vulnerabilities" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Exposed Ports and Networks
&lt;/h2&gt;

&lt;p&gt;Containers love open ports. Attackers love them too.&lt;br&gt;
It’s easy to expose unnecessary ports in your docker run command or Compose file.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Fix:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;"Expose only what you need"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Use firewalls or Docker’s internal network isolation"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Avoid mapping 0.0.0.0:PORT unless required"&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Secrets Baked into Images
&lt;/h2&gt;

&lt;p&gt;Embedding secrets in Dockerfiles or image layers is a disaster waiting to happen.&lt;br&gt;
Those credentials live forever in your image history.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Fix: Use Docker secrets or environment variables passed at runtime instead of hardcoding them.&lt;/p&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker secret create db_password secret.txt

&lt;/code&gt;&lt;/pre&gt;

&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  How to Secure Docker Like a Security Engineer
&lt;/h2&gt;

&lt;p&gt;Now let’s talk defense. Here’s how to containerize responsibly&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Use Docker Bench for Security
&lt;/h2&gt;

&lt;p&gt;Docker’s own security audit tool scans your host and container configs for known issues.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -it --net host --pid host --userns host --cap-add audit_control \
-v /var/lib:/var/lib -v /var/run/docker.sock:/var/run/docker.sock \
--label docker_bench_security \
docker/docker-bench-security

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Drop Unneeded Capabilities
&lt;/h2&gt;

&lt;p&gt;Most containers don’t need full kernel privileges. Drop them!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run --cap-drop=ALL --security-opt no-new-privileges myapp

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This prevents privilege escalation, even if the container is compromised.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Sign and Verify Your Images
&lt;/h2&gt;

&lt;p&gt;Enable &lt;strong&gt;Docker Content Trust&lt;/strong&gt; to make sure only signed, verified images are pulled or run.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export DOCKER_CONTENT_TRUST=1

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Limit Resource Access
&lt;/h2&gt;

&lt;p&gt;Set memory, CPU, and file system limits so runaway processes don’t take down your host.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -m 512m --cpus="1.0" myapp

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Use Read-Only File Systems
&lt;/h2&gt;

&lt;p&gt;Make your containers immutable when possible:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run --read-only myapp

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Real-World Example: Tesla’s Docker Disaster
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frrokod2r1b9r0rebhrlo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frrokod2r1b9r0rebhrlo.png" alt="Compromised Tesla Container" width="800" height="480"&gt;&lt;/a&gt;&lt;br&gt;
In 2018, attackers infiltrated Tesla’s Kubernetes cluster by exploiting a misconfigured Docker container.They found credentials stored in plain text inside an image, escalated privileges, and used Tesla’s cloud to run crypto miners.&lt;/p&gt;

&lt;p&gt;The lesson?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One poorly secured container can become a breach vector for your entire infrastructure.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Tools for Docker Security
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmr61fgt8a00mye7vi3g6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmr61fgt8a00mye7vi3g6.jpg" alt="Tools for Docker Security" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Docker makes software delivery easy, but security? That’s still on you.&lt;/p&gt;

&lt;p&gt;Containers are isolated, not invincible.&lt;br&gt;
Think of Docker security like sunscreen: you only realize you needed it after you get burned. ☀️&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0tdsa9dz2wt5s85ay06x.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0tdsa9dz2wt5s85ay06x.jpg" alt="docker meme - Keeping an eye on your containers" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>containers</category>
      <category>devops</category>
      <category>security</category>
      <category>docker</category>
    </item>
    <item>
      <title>Docker in a Nutshell: Containers Made Simple</title>
      <dc:creator>Felicity Lois</dc:creator>
      <pubDate>Tue, 07 Oct 2025 18:59:43 +0000</pubDate>
      <link>https://dev.to/leesha_lois/docker-in-a-nutshell-containers-made-simple-2fa7</link>
      <guid>https://dev.to/leesha_lois/docker-in-a-nutshell-containers-made-simple-2fa7</guid>
      <description>&lt;p&gt;Docker has become one of those technologies you can’t avoid hearing about if you work in DevOps, Cloud, or backend development. For a while, I’d see engineers casually drop the word “containerized” in conversations like it was nothing, meanwhile, I was silently Googling what that meant.&lt;/p&gt;

&lt;p&gt;Fast forward a few months, and I’ve spent quite a bit of time working with Docker, building, testing, and deploying applications in containers. And I can confidently say: Docker isn’t just another buzzword. It’s one of the most powerful tools for modern software development.&lt;/p&gt;

&lt;p&gt;This post will break Docker down in plain terms, what it is, why it matters, and how it actually works. Think of this as a starting point if you’ve ever wondered what all the hype is about or if you’re ready to start using it in your own projects.&lt;/p&gt;

&lt;p&gt;We’ll cover:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;What Docker really is (beyond the marketing talk)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The difference between containers and virtual machines&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Core Docker concepts you should know&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How Docker fits into cloud and DevOps workflows&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What to learn next&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What Even Is Docker?
&lt;/h2&gt;

&lt;p&gt;In simple terms, Docker is a platform for building, running, and shipping applications in containers.&lt;/p&gt;

&lt;p&gt;A container is like a lightweight, portable box that holds everything your app needs to run the code, libraries, dependencies, and system tools. You can ship this box anywhere (AWS, your laptop, a CI/CD pipeline) and it’ll behave exactly the same.&lt;/p&gt;

&lt;p&gt;That’s the magic.&lt;/p&gt;

&lt;p&gt;Without Docker, developers often run into the infamous “it works on my machine” problem. Docker solves that by standardizing the environment your app runs in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Containers vs Virtual Machines
&lt;/h2&gt;

&lt;p&gt;This is one of the most important things to understand early.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;virtual machine (VM)&lt;/strong&gt; runs a full operating system, complete with its own kernel, drivers, and memory allocation. That means it’s heavy and slower to start.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;container&lt;/strong&gt;, on the other hand, shares the host’s operating system kernel and only includes what’s necessary for the app to run. It’s much smaller, faster, and more efficient.&lt;/p&gt;

&lt;p&gt;Here’s a visual:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VM:        OS → App + Dependencies + Guest OS
Container: OS → App + Dependencies (no extra OS)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So while VMs might take minutes to spin up, containers can start in seconds (sometimes milliseconds).&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Concepts in Docker
&lt;/h2&gt;

&lt;p&gt;Docker has a few key building blocks. Once you understand these, the whole thing starts to make sense.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Dockerfile
&lt;/h2&gt;

&lt;p&gt;A text file that defines how your image should be built.&lt;br&gt;
Think of it as a recipe; listing all the ingredients (dependencies, commands, ports, etc.).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM node:18
WORKDIR /app
COPY . .
RUN npm install
CMD ["npm", "start"]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Image
&lt;/h2&gt;

&lt;p&gt;An image is a snapshot of your application environment. It’s built from the Dockerfile and used to create containers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fktrs0jxx0ggj49510vgq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fktrs0jxx0ggj49510vgq.png" alt="A screenshot of Docker Image" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Container
&lt;/h2&gt;

&lt;p&gt;A running instance of an image. It’s your app, fully isolated and ready to go.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxtzps8tka6uuuzikclnr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxtzps8tka6uuuzikclnr.png" alt="A screenshot of Docker Container" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Docker Hub
&lt;/h2&gt;

&lt;p&gt;A public registry where images are stored and shared, kind of like GitHub but for containers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyyef01p0qf8ep5d0wsm0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyyef01p0qf8ep5d0wsm0.png" alt="Docker Hub" width="800" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Docker Matters (Especially in Cloud &amp;amp; DevOps)
&lt;/h2&gt;

&lt;p&gt;In cloud environments, scalability and consistency are everything. Docker helps achieve both.&lt;/p&gt;

&lt;p&gt;Here’s how:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Consistency:&lt;/strong&gt; The same container runs identically across environments (dev, staging, prod).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Portability:&lt;/strong&gt; Works on AWS, Azure, GCP, or your local machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Efficiency:&lt;/strong&gt; Containers use fewer resources than VMs, so you can run more apps per host.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Automation:&lt;/strong&gt; Docker integrates perfectly with CI/CD tools like GitHub Actions, Jenkins, and GitLab.&lt;/p&gt;

&lt;p&gt;Most importantly for security engineers: containers improve isolation. If one app is compromised, it’s sandboxed, reducing blast radius. (Although Docker security deserves its own post.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Docker Commands
&lt;/h2&gt;

&lt;p&gt;Here are a few commands you’ll use daily:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker build -t myapp .        # Build image
docker run -d -p 3000:3000 myapp   # Run container
docker ps                      # List running containers
docker exec -it &amp;lt;container&amp;gt; bash   # Access container shell
docker stop &amp;lt;container&amp;gt;        # Stop a container

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Get comfortable with these first; they form the foundation of every workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Docker Compose
&lt;/h2&gt;

&lt;p&gt;If you have multiple services (say, a web app + database + cache), managing them individually is a pain.&lt;br&gt;
&lt;strong&gt;Docker Compose&lt;/strong&gt; solves this by letting you define and run multi-container applications.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;version: '3'
services:
  app:
    build: .
    ports:
      - "3000:3000"
  db:
    image: postgres
    environment:
      POSTGRES_PASSWORD: example

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One command (&lt;code&gt;docker-compose up&lt;/code&gt;) and everything spins up together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Docker in the Cloud
&lt;/h2&gt;

&lt;p&gt;Docker fits perfectly into modern cloud workflows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use it to &lt;strong&gt;containerize&lt;/strong&gt; apps before deploying them to services like ECS, EKS, or GKE.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Combine it with &lt;strong&gt;Kubernetes&lt;/strong&gt; for orchestration and scaling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automate builds with &lt;strong&gt;Terraform&lt;/strong&gt; and CI/CD pipelines.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re a cloud engineer or security specialist, Docker is one of those skills that will constantly show up in your day-to-day work, from managing microservices to running vulnerability scans.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to Learn Next
&lt;/h2&gt;

&lt;p&gt;Once you’re comfortable building and running containers locally, here’s what to explore next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Docker Compose (multi-container apps)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker Networking&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker Security &amp;amp; Best Practices&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pushing and pulling images from Docker Hub or private registries&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Container orchestration with Kubernetes&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Learning Docker completely changed the way I approach development. It took away the frustration of environment setup and replaced it with portability, consistency, and speed.&lt;/p&gt;

&lt;p&gt;If you’re a cloud, DevOps, or security engineer, Docker is no longer optional. It’s a core part of how modern infrastructure works.&lt;/p&gt;

&lt;p&gt;And once you get comfortable with it, trust me, you’ll never want to go back to “it works on my machine” again. 😅&lt;/p&gt;

&lt;p&gt;In the next post, we’ll dive into &lt;strong&gt;Docker security&lt;/strong&gt;, how attackers exploit misconfigurations, and how to lock down your containers before they ever hit production.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>cloudcomputing</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>10 Linux commands every Cloud Security Engineer should master</title>
      <dc:creator>Felicity Lois</dc:creator>
      <pubDate>Mon, 06 Oct 2025 17:58:51 +0000</pubDate>
      <link>https://dev.to/leesha_lois/10-linux-commands-every-cloud-security-engineer-should-master-120b</link>
      <guid>https://dev.to/leesha_lois/10-linux-commands-every-cloud-security-engineer-should-master-120b</guid>
      <description>&lt;p&gt;In cloud security, Linux isn’t just an operating system; it’s your first line of defense.&lt;br&gt;
From investigating incidents to hardening servers, knowing your way around the command line can make the difference between a secure system and a compromised one.&lt;/p&gt;

&lt;p&gt;Here are 10 Linux commands every Cloud Security Engineer should master and how they help keep your infrastructure safe.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. grep — The Investigator’s Best Friend
&lt;/h2&gt;

&lt;p&gt;Logs tell stories, and grep helps you find the important ones fast.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;grep -r "Failed password" /var/log/auth.log

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use case:&lt;/strong&gt; Search for failed SSH login attempts or suspicious activity.&lt;br&gt;
&lt;strong&gt;Pro tip:&lt;/strong&gt; Combine with tail -f to monitor logs in real time during an investigation.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. awk — Analyze Logs Like a Security Analyst
&lt;/h2&gt;

&lt;p&gt;awk lets you extract and analyze fields from large log files or command outputs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;awk '{print $1, $3}' /var/log/auth.log | sort | uniq -c | sort -nr

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use case:&lt;/strong&gt; Identify IPs with repeated failed login attempts.&lt;br&gt;
&lt;strong&gt;Pro tip:&lt;/strong&gt; Use awk in shell scripts to automate threat-hunting reports.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. sed — Edit Sensitive Files Safely
&lt;/h2&gt;

&lt;p&gt;Need to remove exposed credentials or misconfigurations quickly? sed lets you fix them fast without opening editors.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sed -i 's/password=.*/password=********/' config.env

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use case:&lt;/strong&gt; Mask secrets or sanitize configuration files.&lt;br&gt;
&lt;strong&gt;Pro tip:&lt;/strong&gt; Always back up files before running sed -i in production.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. ss (or netstat) — Spot Suspicious Connections
&lt;/h2&gt;

&lt;p&gt;Network visibility is critical in cloud security.&lt;br&gt;
With ss, you can see all active connections and listening ports.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ss -tuln

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. top / htop — Catch Resource Hijacking
&lt;/h2&gt;

&lt;p&gt;When attackers gain access, they often use your compute resources (for cryptomining, for instance).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use case:&lt;/strong&gt; Identify CPU- or memory-hogging processes.&lt;br&gt;
&lt;strong&gt;Pro tip:&lt;/strong&gt; Press F5 in htop to view process trees and trace suspicious sub-processes.&lt;/p&gt;
&lt;h2&gt;
  
  
  6. df -h &amp;amp; du -sh — Monitor Storage for Clues
&lt;/h2&gt;

&lt;p&gt;Sudden disk usage spikes can indicate data exfiltration or log flooding attacks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;df -h     # Check overall disk usage
du -sh *  # Identify large directories

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use case:&lt;/strong&gt; Spot unexpected data growth in /tmp or /var/log.&lt;br&gt;
&lt;strong&gt;Pro tip:&lt;/strong&gt; Automate alerts when disk usage crosses a safe threshold.&lt;/p&gt;
&lt;h2&gt;
  
  
  7. ps aux | grep — Hunt for Malicious Processes
&lt;/h2&gt;

&lt;p&gt;Attackers often disguise malicious binaries under legitimate names.&lt;br&gt;
This command helps you detect them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ps aux | grep python

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use case:&lt;/strong&gt; Look for suspicious scripts running under service accounts.&lt;br&gt;
&lt;strong&gt;Pro tip:&lt;/strong&gt; Combine with ls -l /proc//exe to inspect the actual binary.&lt;/p&gt;
&lt;h2&gt;
  
  
  8. chmod &amp;amp; chown — Enforce Access Control
&lt;/h2&gt;

&lt;p&gt;Weak file permissions are an open invitation for privilege escalation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod 600 /etc/ssh/ssh_host_rsa_key
chown root:root /etc/ssh/ssh_host_rsa_key

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use case: Lock down SSH keys, config files, and credentials.&lt;br&gt;
Pro tip: Regularly audit permissions in /etc/, /var/log/, and app directories.&lt;/p&gt;
&lt;h2&gt;
  
  
  9. tar &amp;amp; gzip — Secure Backups and Forensics
&lt;/h2&gt;

&lt;p&gt;When performing incident response, you’ll often need to compress and transfer data securely.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tar -czvf logs_backup.tar.gz /var/log/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use case:&lt;/strong&gt; Create backups of logs or configurations for analysis.&lt;br&gt;
&lt;strong&gt;Pro tip:&lt;/strong&gt; Use encryption (gpg or openssl) for sensitive archives.&lt;/p&gt;
&lt;h2&gt;
  
  
  10. systemctl — Manage Services Securely
&lt;/h2&gt;

&lt;p&gt;Attackers frequently target running services.&lt;br&gt;
With systemctl, you can control, inspect, and harden service configurations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl status ssh
systemctl disable ftp

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use case:&lt;/strong&gt; Check service status, disable unused ones, or restart after patching.&lt;br&gt;
&lt;strong&gt;Pro tip:&lt;/strong&gt; Use systemctl list-unit-files | grep enabled to find all active services.&lt;/p&gt;

&lt;p&gt;Mastering Linux commands isn’t just about productivity; it’s about visibility, control, and defense.&lt;br&gt;
As a Cloud Security Engineer, every keystroke on Linux can reveal vulnerabilities, secure systems, or stop an active threat.&lt;/p&gt;

&lt;p&gt;The more fluent you become with Linux, the faster you can detect, respond, and prevent cloud security incidents.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cloudcomputing</category>
      <category>cybersecurity</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
