Comments (6)
Dockfile文件顶部有两行:
# RUN export http_proxy=192.168.1.10:1080
# RUN export https_proxy=192.168.1.10:1080
取消注释,proxy IP换成可用的IP。
from dnmp.
还是不行 我换成本机的ip 取消注释 报的错误还是一样.....
from dnmp.
这里的IP是指可访问外国网的代理IP。
或者在docker-compose.yml文件的php-fpm块给容器加上DNS,如:
dns
- 8.8.8.8
- 8.8.4.4
from dnmp.
还是不行 我都快崩溃了 别人都没遇到这个问题嘛 。。。。坑
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.
在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.
OK,这个问题主要和网络环境,DNS解析,以及ubuntu容器的源有关。
from dnmp.
Related Issues (20)
- php镜像自动拉取一直报错 HOT 2
- 使用 php-cli 时出错 HOT 1
- imagick扩展安装失败 HOT 3
- 新手求怎么切换版本谢谢 HOT 1
- php容器中使用supervisor后nginx无法访问php项目
- 建议弄套默认的生产配置 HOT 2
- mac m1 芯片 docker-compose up no matching manifest for linux/arm64/v8 in the manifest list entries HOT 2
- 建议加上php8.2,并修复php8安装扩展失效的问题 HOT 4
- php56, redis扩展死活安装不上 HOT 1
- docker compose up 报错 Permission denied HOT 1
- 如何使用相同port同时配置多站点 HOT 7
- 建议加上disable_functions = HOT 1
- imagick的扩展在php80上怎样装都装不上 HOT 2
- nginx.conf的问题 HOT 3
- 关于修复memcached版本的问题 HOT 1
- es数据文件挂载不出来
- 安装报错了,修改了yml文件里的端口重新拉取还是一样报错 HOT 1
- php8.3有计划么? HOT 3
- 手动安装的容器,如何在启动dnmp的时候也默认启动 HOT 1
- 新版本构建php和nginx容器报错 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dnmp.