PHP容器化demo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
639 B

3 years ago
  1. # gq-hello.dockerfile
  2. # Dockerfile for demo gq-hello
  3. # This docker file base on harbor02.juejin.id/lib/php:7.2.9-fpm-alpine3.8
  4. # @version 180719:2
  5. # @author zhangxuhong <zhangxuhong@xitu.io>
  6. #
  7. # base info
  8. FROM harbor02.juejin.id/infrastructure/php-7.2.9-fpm-alpine3.8:latest
  9. MAINTAINER zhangxuhong <zhangxuhong@xitu.io>
  10. USER root
  11. # init
  12. # RUN apk add --update --no-cache --virtual .build-deps \
  13. # copy repo to /data/repo
  14. COPY . /data/repo/gq-hello/
  15. # define health check
  16. HEALTHCHECK --interval=5s --timeout=3s CMD netstat -an | grep 9000 > /dev/null; if [ 0 != $? ]; then exit 1; fi;
  17. # run php-fpm
  18. EXPOSE 9000
  19. ENTRYPOINT ["php-fpm"]