Dockerfile 961 B

1234567891011121314151617181920212223242526272829
  1. # Dockerfile for apollo-config-server
  2. # Build with:
  3. # docker build -t apollo-config-server:v1.0.0 .
  4. FROM openjdk:8-jre-alpine3.8
  5. RUN \
  6. echo "http://mirrors.aliyun.com/alpine/v3.8/main" > /etc/apk/repositories && \
  7. echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories && \
  8. apk update upgrade && \
  9. apk add --no-cache procps curl bash tzdata && \
  10. ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
  11. echo "Asia/Shanghai" > /etc/timezone && \
  12. mkdir -p /apollo-config-server
  13. ADD . /apollo-config-server/
  14. ENV APOLLO_CONFIG_SERVICE_NAME="service-apollo-config-server.sre"
  15. ENV DATASOURCES_URL="jdbc:mysql://service-mysql-for-apollo.sre:3306/ApolloConfigDB?characterEncoding=utf8"
  16. ENV DATASOURCES_USERNAME="FillInCorrectUser"
  17. ENV DATASOURCES_PASSWORD="FillInCorrectPassword"
  18. EXPOSE 8080
  19. ENTRYPOINT ["/apollo-config-server/entrypoint.sh"]
  20. CMD ["/apollo-config-server/scripts/startup-kubernetes.sh"]