Giter Club home page Giter Club logo

Comments (6)

yeszao avatar yeszao commented on August 27, 2024

Dockfile文件顶部有两行:

# RUN export http_proxy=192.168.1.10:1080
# RUN export https_proxy=192.168.1.10:1080

取消注释,proxy IP换成可用的IP。

from dnmp.

ihziluoh avatar ihziluoh commented on August 27, 2024

还是不行 我换成本机的ip 取消注释 报的错误还是一样.....

from dnmp.

yeszao avatar yeszao commented on August 27, 2024

这里的IP是指可访问外国网的代理IP。
或者在docker-compose.yml文件的php-fpm块给容器加上DNS,如:

  dns
    - 8.8.8.8
    - 8.8.4.4

from dnmp.

ihziluoh avatar ihziluoh commented on August 27, 2024

还是不行 我都快崩溃了 别人都没遇到这个问题嘛 。。。。坑
php-fpm:
build: .
expose:
- "9000"
dns:
- 8.8.8.8
- 8.8.4.4
volumes:
- ./www/:/var/www/html/:rw
- ./conf/php/php.ini:/usr/local/etc/php/php.ini:ro
- ./conf/php/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./log/php-fpm/:/var/log/php-fpm/:rw
links:
- mysql:mysql

Get:8 http://deb.debian.org jessie/main amd64 Packages [9035 kB]
Fetched 9788 kB in 5min 57s (27.3 kB/s)
W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/binary-amd64/Packages Hash Sum mismatch

W: Failed to fetch http://deb.debian.org/debian/dists/jessie/main/binary-amd64/Packages Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.
ERROR: Service 'php-fpm' failed to build: The command '/bin/sh -c apt-get update' returned a non-zero code: 100

from dnmp.

ihziluoh avatar ihziluoh commented on August 27, 2024

在Dockerfile 改了下源 之前不行 这次尝试又可以了。。。。。。

FROM php:fpm

You may need proxy

#RUN export http_proxy=192.168.1.10:1080
#RUN export https_proxy=192.168.1.10:1080

RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak

RUN echo "deb http://mirrors.aliyun.com/debian/ jessie main non-free contrib" >> /etc/apt/sources.list
RUN echo "deb http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib" >> /etc/apt/sources.list
RUN echo "deb-src http://mirrors.aliyun.com/debian/ jessie main non-free contrib" >> /etc/apt/sources.list
RUN echo "deb-src http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib" >> /etc/apt/sources.list

from dnmp.

yeszao avatar yeszao commented on August 27, 2024

OK,这个问题主要和网络环境,DNS解析,以及ubuntu容器的源有关。

from dnmp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.