docker apt-get 換源問題
進入容器
docker exec -u 0 -it f9ec4ad9e836 /bin/sh
laradock 配置
Environment
# If you need to change the sources (i.e. to China), set CHANGE_SOURCE to true
CHANGE_SOURCE=true
# Set CHANGE_SOURCE and UBUNTU_SOURCE option if you want to change the Ubuntu system sources.list file.
UBUNTU_SOURCE=tsinghua
問題原因
使用 laravel docker 中因為眾所周知的問題,會出現訪問源文件失敗
目前我出現問題的模塊為 PHP-FPM
修改 報錯相應位置源 目錄 laradock/php-fpm/Dockerfile
使用以下命令替換源
RUN sed -i "s@http://deb.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.list
RUN cat /etc/apt/sources.list
RUN rm -Rf /var/lib/apt/lists/*
RUN apt-get update
