收藏
回答

微信云托管dockerfile部署发布nginx+php环境,一直失败,请高手指导如何修改?

FROM alpine:3.13

RUN --no-cache apk add ca-certificates && update ca-certificates

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tencent.com/g' /etc/apk/repositories \
    && apk add --update --no-cache \
    php7 \
    php7-json \
    php7-ctype \
    php7-exif \
    php7-pdo \
    php7-pdo_mysql \
    php7-fpm \
    php7-curl \
    nginx \
    && rm -f /var/cache/apk/*

WORKDIR /var/www
COPY . /var/www

RUN cp /var/www/conf/nginx.conf /etc/nginx/conf.d/default.conf \
    && cp /var/www/conf/fpm.conf /etc/php7/php-fpm.d/www.conf \
    && cp /var/www/conf/php.ini /etc/php7/php.ini

EXPOSE 80

CMD php-fpm -D && nginx -g 'daemon off;'
回答关注问题邀请回答
收藏

1 个回答

  • Alfred Huang
    Alfred Huang
    2023-12-27

    可以提供下报错信息

    2023-12-27
    有用
    回复 3
    • AI
      AI
      2023-12-27
      -----------构建wxcomponent-161786-010-----------
      2023-12-25 22:58:06 create_build_image : succ,
      2023-12-25 22:58:32 check_build_image : succ, ,
      -----------服务wxcomponent-161786部署wxcomponent-161786-010-----------
      2023-12-25 22:58:33 check_eks_virtual_service : process, DescribeVersion_user_error_Exec lifecycle hook ([/bin/sh /app/cert/initenv.sh]) for Container "wxcomponent-161786-010" in Pod "wxcomponent-161786-010-867dbc6995-dnxdb_xokmovov(97ab943c-04b2-44e4-abeb-b9361a9e8419)" failed - error: rpc error: code = Unknown desc = failed to exec in container: failed to create exec "e21b3a323b7eb70c2863c2679fb750cf0174641bfb9257066a76c79a21b6b2be": cannot exec in a stopped state: unknown, message: "", [service]:[Failed to pull image "ccr.ccs.tencentyun.com/tcb_prd/coredns:amd64-1.10.1-cloudrun": rpc error: code = Unknown desc = failed to pull and unpack image "ccr.ccs.tencentyun.com/tcb_prd/coredns:amd64-1.10.1-cloudrun": failed to copy: httpReaderSeeker: failed open: failed to do request: Get "http://ccr-avatar-sh-1258344699.cos-internal.ap-shanghai.tencentcos.cn/avatar/data/blob/sha256/d7/d78db2b57cc6b7f8c2dadb1b27d712071d02370ec969748d6f03f10b87efe619?q-sign-algorithm=sha1&q-ak=AKIDysfRH0aYzdEs9GF4f6LOI4g6KK8pRAvb&q-sign-time=1703516339%3B1703517539&q-key-time=1703516339%3B1703517539&q-header-list=host&q-url-param-list=&q-signature=67525ff4f522f2546ad8038473fe8affceef3f83": dial tcp: lookup ccr-avatar-sh-1258344699.cos-internal.ap-shanghai.tencentcos.cn: no such host,Error: ErrImagePull,Exec lifecycle hook ([/bin/sh /app/cert/initenv.sh]) for Container "wxcomponent-161786-010" in Pod "wxcomponent-161786-010-867dbc6995-dnxdb_xokmovov(97ab943c-04b2-44e4-abeb-b9361a9e8419)" failed - error: rpc error: code = Unknown desc = failed to exec in container: failed to create exec "340ae30664368cde470ce915ce610090a375131b799737169d9aec3b8bb1a3a8": cannot exec in a deleted state: unknown, message: "",Error: ImagePullBackOff,Exec lifecycle hook ([/bin/sh /app/cert/initenv.sh]) for Container "wxcomponent-161786-010" in Pod "wxcomponent-161786-010-867dbc6995-dnxdb_xokmovov(97ab943c-04b2-44e4-abeb-b9361a9e8419)" failed - error: rpc error: code = Unknown desc = failed to exec in container: failed to create exec "fe93847eb1bab389bc10db525eecb490a21c984eac26c0343c0ec5f3a0052cfd": cannot exec in a stopped state: unknown, message: "",Back-off restarting failed container,Exec lifecycle hook ([/bin/sh /app/cert/initenv.sh]) for Container "wxcomponent-161786-010" in Pod "wxcomponent-161786-010-867dbc6995-dnxdb_xokmovov(97ab943c-04b2-44e4-abeb-b9361a9e8419)" failed - error: rpc error: code = Unknown desc = failed to exec in container: failed to create exec "b9707ea2abfe1283d36ae997f350de35ed3d69ac0f3184f619a05f4becbd6371": cannot exec in a stopped state: unknown, message: "",Exec lifecycle hook ([/bin/sh /app/cert/initenv.sh]) for Container "wxcomponent-161786-010" in Pod "wxcomponent-161786-010-867dbc6995-dnxdb_xokmovov(97ab943c-04b2-44e4-abeb-b9361a9e8419)" failed - error: rpc error: code = Unknown desc = failed to exec in container: failed to create exec "2060dccee1a1f6a3892f95f8d48b0bd5b14bfc3eba03d0e22d3ced4577148ff4": cannot exec in a stopped state: unknown, message: "",Exec lifecycle hook ([/bin/sh /app/cert/initenv.sh]) for Container "wxcomponent-161786-010" in Pod "wxcomponent-161786-010-867dbc6995-dnxdb_xokmovov(97ab943c-04b2-44e4-abeb-b9361a9e8419)" failed - error: rpc error: code = Unknown desc = failed to exec in container: failed to create exec "e21b3a323b7eb70c2863c2679fb750cf0174641bfb9257066a76c79a21b6b2be": cannot exec in a stopped state: unknown, message: "",]
      2023-12-25 22:58:33 create_eks_virtual_service : succ,
      2023-12-27
      回复
    • coder_gong
      coder_gong
      06-20
      官方 有私下回复么? 感觉云托管并不好用
      06-20
      回复
    • Alfred Huang
      Alfred Huang
      06-28回复AI
      有系统镜像获取失败。目前还有这个问题么?
      06-28
      回复
登录 后发表内容
问题标签