Docker 指令

PostgreSQL

docker run -d --restart=unless-stopped -p 5432:5432 -v postgres:/var/lib/postgresql/data -e POSTGRES_HOST_AUTH_METHOD=trust --name postgres postgres:alpine
CREATE ROLE root SUPERUSER LOGIN;
CREATE DATABASE root OWNER root;

Mosquitto

docker run -d --restart=unless-stopped -p 1883:1883 -v mosquitto-data:/mosquitto/data -v mosquitto-log:/mosquitto/log --name mosquitto eclipse-mosquitto

Redis

docker run -d --restart=unless-stopped -p 6379:6379 -v redis:/data --name redis redis:alpine