docker-compose.yaml
cat > docker-compose.yaml << EOF version: "3" services: apollo-configservice: ##容器服务名 container_name: apollo-configservice ##容器名 ##build: apollo-configservice/src/main/docker/ ##Dockerfile路径 image: zywj/apollo-configservice:1.7.2 ##镜像名 ports: - "9080:9080" ##volumes: ##- "/opt/logs/100003171:/opt/logs/100003171" ##将/opt/logs/100003171目录挂载到宿主机的/opt/logs/100003171方便在宿主机上查看日志 environment: - spring_datasource_url=jdbc:mysql://10.211.55.4:3306/ApolloConfigDB?characterEncoding=utf8 - spring_datasource_username=root - spring_datasource_password=123456 ## - eureka.instance.ip-address=10.211.55.4 restart: always apollo-adminservice: container_name: apollo-adminservice ##build: apollo-adminservice/src/main/docker/ image: zywj/apollo-adminservice:1.7.2 ports: - "9090:9090" depends_on: - apollo-configservice ##volumes: ##- "/opt/logs/100003172:/opt/logs/100003172" environment: - spring_datasource_url=jdbc:mysql://10.211.55.4:3306/ApolloConfigDB?characterEncoding=utf8 - spring_datasource_username=root - spring_datasource_password=123456 ##- eureka.instance.ip-address=10.211.55.4 restart: always apollo-portal: container_name: apollo-portal ##build: apollo-portal/src/main/docker/ image: zywj/apollo-portal:1.7.2 ports: - "9070:9070" depends_on: - apollo-adminservice ##volumes: ##- "/opt/logs/100003173:/opt/logs/100003173" environment: - spring_datasource_url=jdbc:mysql://10.211.55.4:3306/ApolloPortalDB?characterEncoding=utf8 - spring_datasource_username=root - spring_datasource_password=123456 restart: always EOF
执行并查看
docker-compose up -d docker ps
标签:compose,yaml,arm64,版本,docker,apollo From: https://www.cnblogs.com/cgy-home/p/16966537.html