# Docker安装Apollo

  1. config Service
docker run -d \
    --name apollo-configservice \
    --link=mysql:mysql \
    -v /tmp/logs:/opt/logs \
    -e SPRING_DATASOURCE_URL="jdbc:mysql://mysql:3306/ApolloConfigDB?characterEncoding=utf8" \
    -e SPRING_DATASOURCE_USERNAME=root \
    -e SPRING_DATASOURCE_PASSWORD=root \
    apolloconfig/apollo-configservice 
1
2
3
4
5
6
7
8
  1. adminservice
docker run -d \
    --name apollo-adminservice \
    --link=mysql:mysql \
    -v /tmp/logs:/opt/logs \
    -e SPRING_DATASOURCE_URL="jdbc:mysql://mysql:3306/ApolloConfigDB?characterEncoding=utf8" \
    -e SPRING_DATASOURCE_USERNAME=root \
    -e SPRING_DATASOURCE_PASSWORD=root \
    apolloconfig/apollo-adminservice
1
2
3
4
5
6
7
8
  1. portal
docker run -d \
    --name apollo-portal \
    --link=mysql:mysql \
    -v /tmp/logs:/opt/logs \
    -e SPRING_DATASOURCE_URL="jdbc:mysql://mysql:3306/ApolloPortalDB?characterEncoding=utf8" \
    -e SPRING_DATASOURCE_USERNAME=root \
    -e SPRING_DATASOURCE_PASSWORD=root \
    -e APOLLO_PORTAL_ENVS=dev \
    -e DEV_META=http://192.168.3.18:8080 \
    apolloconfig/apollo-portal
1
2
3
4
5
6
7
8
9
10