快速启动
docker run \
-p 5432:5432 \
-e POSTGRES_PASSWORD=wcjiang \
--name postgres \
--restart always \
-d \
postgres:latest
使用 stack 部署示例
# Use postgres/example user/password credentials
version: '3.1'
services:
db:
image: postgres:latest
restart: always
environment:
POSTGRES_PASSWORD: example
adminer:
image: adminer:latest
restart: always
ports:
- 8081:8080
docker stack deploy -c stack.yml postgres