>  Q&A  >  본문

docker-compose - docker 官方的镜像大多基于debian,但是官方源更新失败,如何更换成中国源?

docker-compose --project-name "dev_" build php
Building php
Step 1 : FROM php:5.6-fpm
 ---> a0e78ea4a88b
Step 2 : RUN apt-get update && apt-get install -y         git         libgearman-dev         libmemcached-dev         libmcrypt-dev         libfreetype6-dev         libjpeg62-turbo-dev         libpng12-dev         libmagickwand-dev         libmagickcore-dev
 ---> Running in 8181163c0190
Ign http://security.debian.org jessie/updates InRelease
Err http://security.debian.org jessie/updates Release.gpg
  Connection failed
Ign http://security.debian.org jessie/updates Release
Err http://security.debian.org jessie/updates/main amd64 Packages
  
Err http://security.debian.org jessie/updates/main amd64 Packages
  
Err http://security.debian.org jessie/updates/main amd64 Packages
  
Err http://security.debian.org jessie/updates/main amd64 Packages
  
Err http://security.debian.org jessie/updates/main amd64 Packages
  Connection failed
Err http://httpredir.debian.org jessie InRelease
  
Err http://httpredir.debian.org jessie-updates InRelease
  
Err http://httpredir.debian.org jessie Release.gpg
  Could not resolve 'httpredir.debian.org'
Err http://httpredir.debian.org jessie-updates Release.gpg
  Could not resolve 'httpredir.debian.org'
Reading package lists...
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/InRelease  

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/InRelease  

W: Failed to fetch http://security.debian.org/dists/jessie/updates/Release.gpg  Connection failed

W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/binary-amd64/Packages  Connection failed

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/Release.gpg  Could not resolve 'httpredir.debian.org'

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/Release.gpg  Could not resolve 'httpredir.debian.org'

W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package git
E: Unable to locate package libgearman-dev
E: Unable to locate package libmemcached-dev
E: Unable to locate package libmcrypt-dev
E: Unable to locate package libfreetype6-dev
E: Unable to locate package libjpeg62-turbo-dev
E: Unable to locate package libpng12-dev
E: Unable to locate package libmagickwand-dev
E: Unable to locate package libmagickcore-dev
ERROR: Service 'php' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y         git         libgearman-dev         libmemcached-dev         libmcrypt-dev         libfreetype6-dev         libjpeg62-turbo-dev         libpng12-dev         libmagickwand-dev         libmagickcore-dev' returned a non-zero code: 100
PHP中文网PHP中文网2705일 전1629

모든 응답(6)나는 대답할 것이다

  • 黄舟

    黄舟2017-04-26 09:03:49

    으아악

    회신하다
    0
  • 仅有的幸福

    仅有的幸福2017-04-26 09:03:49

    특정 국내 방송국의 이미지를 활용하여 특정 국내 방송국의 이미지를 재생할 수 있습니다

    회신하다
    0
  • 黄舟

    黄舟2017-04-26 09:03:49

    프록시 체인을 사용하여 과학적인 인터넷 연결을 포트 1080으로 프록시한 다음 공식 소스를 요청하면 속도가 느리지 않습니다. 이것이 내가 한 일입니다.

    회신하다
    0
  • 習慣沉默

    習慣沉默2017-04-26 09:03:49

    회사의 경우 업데이트된 이미지를 제출할 때마다 속도가 느려지지 않도록 내부 또는 테스트 시스템에 개인 이미지 저장 서버를 설정하세요.

    회신하다
    0
  • PHPz

    PHPz2017-04-26 09:03:49

    대부분의 공식 이미지는 debian:jessie를 기반으로 합니다. 이 기본 이미지를 자주 가져오지 못하는 경우 다음과 같은 작은 팁이 있습니다.

    daocloud 등 국내 미러 사이트에서 직접 이미지를 가져오면, 가져온 이미지의 이름은 대충 daocloud.io/library/debian:jessie 이고, docker tag daocloud.io/library/debian:jessie debian:jessie 을 실행하면 이미지 이름을 바꾸는 것과 유사한 작업이 완료됩니다. 같은 이미지가 두 번 나타납니다.) 빌드를 실행할 때 해당 이름의 이미지가 로컬에 있는지 먼저 검색하므로 데비안 기본 이미지가 인터넷에서 다운로드되지 않습니다

    회신하다
    0
  • 迷茫

    迷茫2017-04-26 09:03:49

    (Docker 가속기 구성) 구성하지 않으면 기본적으로 다운로드가 불가능합니다

    https://dashboard.daocloud.io/에 접속하셔서 먼저 계정을 등록하시면 됩니다. 그다음 로그인 후 개인센터에 들어가시면 됩니다. 직접 확인해보세요. Linux Mac Windows의 사용법이 포함되어 있습니다.

    참고 기사: /a/11...

    회신하다
    0
  • 취소회신하다