Get a basic MDC up and running
Getting MDC up and running with docker compose
HOW TO DOCKER
adam grunden
3/8/20241 min read


Install docker compose:
curl -L "https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Set permissions if not running in root:
chmod +x /usr/local/bin/docker-compose
Check that it's there:
docker-compose --version
next pull:
docker pull opswat/metadefendercore-debian:latest
next pull:
docker pull postgres:12.10
Make docker-compose file:
nano docker-compose.yml
Copy the below into the file, save it, and do not forget the --- at the top.
A note on formatting: The formatting is worth examining. It did not pull over perfectly here. Google Docker compose formatting, or ask me. I'm sitting right behind you, John.
Once you are sure that everything is good type:
docker compose up -d
Go to a web browser and put the IP of the machine you are running this container on at port 8008
Boom, "localadmin" and "password." You should have an MDC docker image to play with, and you can play with the environmental variable list in the documentation with the template below.
Merry Christmas, John. See, I still care.
---
version: '3'
services:
postgres:
container_name: postgres
image: postgres:12.10
environment:
POSTGRES_PASSWORD: "admin"
ports:
- "5432:5432"
mdcore:
container_name: mdcore
image: opswat/metadefendercore-debian:latest
environment:
LICENSE_KEY: "YOUR_LICENSE_KEY_HERE"
DB_MODE: "4"
DB_TYPE: "remote"
DB_HOST: "postgres"
DB_PORT: "5432"
DB_USER: "postgres"
DB_PWD: "admin"
MD_USER: "localadmin"
MD_PWD: "password"
MD_EMAIL: "admin@local"
ports:
- "8008:8008"
depends_on:
- postgres
Contacts
adamgrunden@gmail.com