列举一些常用的镜像启动配置,方便用到复制 👍
version: '3.1' services: #数据库 mysql: image: mysql:latest restart: always environment: MYSQL_ROOT_PASSWORD: "a1075858260" MYSQL_DATABASE: "database" MYSQL_USER: "ln" MYSQL_PASSWORD: "a1075858260" MYSQL_COLLATION_SERVER: utf8mb4_unicode_ci MYSQL_CHARACTER_SET_SERVER: utf8mb4 ports: - "6611:3306" volumes: - /home/docker_data/mysql_data:/var/lib/mysql command: --default-authentication-plugin=mysql_native_password #nginx管理 app: image: 'chishin/nginx-proxy-manager-zh:latest' # image: 'jc21/nginx-proxy-manager:latest' restart: unless-stopped ports: - '80:80' - '81:81' - '443:443' volumes: - /home/docker_data/nginx-proxy-manager/data:/data - /home/docker_data/nginx-proxy-manager/letsencrypt:/etc/letsencrypt #docker管理 portainer: image: portainer/portainer-ce ports: - 8000:8000 - 9000:9000 volumes: - /var/run/docker.sock:/var/run/docker.sock - /home/docker_data/portainer_data:/data restart: always
dockercospomversion: '3.8' services: agile_config: container_name: agile_config environment: - TZ=Asia/Shanghai - adminConsole=true - db__provider=mysql - db__conn=server=xxx;Port=6607;Database=agile_config;Uid=root;Pwd=a1075858260 ports: - 172.17.0.1:5001:5000 volumes: - /home/ln/volumes/agile_config:/app/db image: kklldog/agile_config:latest restart: always
docker run -d --name my-rabbitmq -p 5672:5672 -p 15662:15672 rabbitmq:3-management
docker run -p 9000:9000 -p 9090:9090 \ --net=host \ --name minio \ -d --restart=always \ -e "MINIO_ACCESS_KEY=minioadmin" \ -e "MINIO_SECRET_KEY=minioadmin" \ -v /home/ln/minio/data:/data \ -v /home/ln/minio/config:/root/.minio \ minio/minio server \ /data --console-address ":9090" -address ":9000"
version: '3.8' services: minio: image: minio/minio container_name: minio restart: always networks: - host ports: - "9000:9000" - "9090:9090" environment: - MINIO_ACCESS_KEY=minioadmin - MINIO_SECRET_KEY=minioadmin - MINIO_CONSOLE_ADDRESS=:9090 volumes: - /home/ln/volumes/minio/data:/data - /home/ln/volumes/minio/config:/root/.minio command: server /data --console-address ":9090" --address ":9000" networks: host: external: true
# Use root/example as user/password credentials version: '3.1' services: mongo: image: mongo restart: always environment: MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: example ports: - 27017:27017 volumes: - ./db:/data/db - ./configdb:/data/configdb mongo-express: image: mongo-express restart: always ports: - 8081:8081 environment: ME_CONFIG_MONGODB_ADMINUSERNAME: root ME_CONFIG_MONGODB_ADMINPASSWORD: example ME_CONFIG_MONGODB_SERVER: mongo depends_on: - mongo
docker run -d --name redis -p 6610:6379 \ -v /home/ln/web/redis-data:/data \ redis redis-server --appendonly yes --requirepass "123456789"
docker run -d -p 9080:80 -v answer-data:/data --name answer answerdev/answer:latest
本文作者:宁骑
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 MIT 许可协议。转载请注明出处!