praetorian-inc / purple-team-attack-automation

Praetorian's public release of our Metasploit automation of MITRE ATT&CK™ TTPs
Other
716 stars 118 forks source link

Question: Docker compose files (.yml and .overide.yml) files are diff than the readme #2

Closed lostInSpaceSomewhere closed 5 years ago

lostInSpaceSomewhere commented 5 years ago

Steps to reproduce

When pulling the repository there are two docker-compose files.

  1. docker-compose.yml

    
    version: '3'
    services:
    ms:
    image: metasploitframework/metasploit-framework:latest
    environment:
      DATABASE_URL: postgres://postgres@db:5432/msf?pool=200&timeout=5
    links:
      - db
    ports:
      - 4444:4444
    volumes:
      - $HOME/.msf4:/home/msf/.msf4
    
    db:
    image: postgres:10-alpine
    volumes:
      - pg_data:/var/lib/postgresql/data

volumes: pg_data: driver: local

2. docker-compose.override.yml

version: '3'

services: ms: build: context: . dockerfile: ./Dockerfile args: BUNDLER_ARGS: --jobs=8 image: metasploit:dev environment: DATABASE_URL: postgres://postgres@db:5432/msf_dev?pool=200&timeout=5 volumes:

Im trying to be a clear as possible, lol, but if its your not understanding, let me know.

thank you!

daniel-infosec commented 5 years ago

Hey there!

We updated the wiki and the README to try and make it a bit clearer. The file you want to edit is docker-compose.local.override.yml which doesn't currently exist. See the installation wiki here: https://github.com/praetorian-inc/purple-team-attack-automation/wiki/Installation

After you add your settings (your LHOST and exposed ports) you need to modify the COMPOSE_FILE environment variable. Instructions are now clearer in the README and wiki. I'll leave this open for now but if you say that this helps or I don't hear back, I'll close it.

lostInSpaceSomewhere commented 5 years ago

ill work through this today to see if there are any issues. Curious as to why the 3 compose files? one for config, one for venom, one for msfconsole?

also im driving this on selinux (RHEL:). If feel like updating anything: In RHEL docker ce is not supported, although you may be able to get an older version installed, it is highly recommended to have Docker EE installed on your system. Docker CE on RHEL will also force work to be done to allocate storage to the docker thin pool which will add complexity. to install docker-compose, yum install docker-compose

thanks!

lostInSpaceSomewhere commented 5 years ago

feel free to close if wish. the documentation helped

jinnabaalu commented 4 years ago

Container is getting closed after some time image

Here is my docker-compose.yml

version: '3'
services:
  metasploit:
    image: metasploitframework/metasploit-framework:latest
    container_name: metasploit
    environment:
      DATABASE_URL: postgres://postgres@db:5432/msf?pool=200&timeout=5
    links:
      - db
    ports:
      - 4444:4444
    # volumes:
    #   - ./.msf4:/home/msf/.msf4

  db:
    image: postgres:10-alpine
    container_name: postgres
    restart: always
    environment:
      # POSTGRES_DB: msdb
      # POSTGRES_USER: msuser
      # POSTGRES_PASSWORD: msuser
      PGDATA: /var/lib/postgresql/data/pgdata
      POSTGRES_HOST_AUTH_METHOD: trust
    volumes:
      - pg_data:/var/lib/postgresql/data/pgdata
    ports:
      - "5432:5432"
volumes:
  pg_data:
    driver: local