Skip to content

Docker Security Overhaul: Dropping capabilities #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
josecelano opened this issue Apr 14, 2025 · 0 comments
Open

Docker Security Overhaul: Dropping capabilities #41

josecelano opened this issue Apr 14, 2025 · 0 comments
Labels
- Admin - Enjoyable to Install and Setup our Software Security Publicly Connected to Security

Comments

@josecelano
Copy link
Member

josecelano commented Apr 14, 2025

Remove capabilities from services with:

    cap_drop:
      - ALL

For example:

# docker-compose.yaml
version: "3.8"

services:
  db:
    image: mysql:latest
    container_name: db
    env_file:
      - .env
    restart: unless-stopped
    privileged: false
    user: "1000:1000"
    cap_drop:
      - ALL
    ports:
      - "3306:3306"
    volumes:
      - ./tmp:/tmp
      - ./mysqld:/var/run/mysqld/
@josecelano josecelano added - Admin - Enjoyable to Install and Setup our Software Security Publicly Connected to Security labels Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Admin - Enjoyable to Install and Setup our Software Security Publicly Connected to Security
Projects
None yet
Development

No branches or pull requests

1 participant