一、运行docker-compose up -d,提示does not have a Release file
603.1 Reading package lists...
603.1 W: The repository 'http://mirrors.163.com/debian stretch Release' does not have a Release file.
603.1 W: The repository 'http://mirrors.163.com/debian stretch-updates Release' does not have a Release file.
603.1 W: The repository 'http://mirrors.163.com/debian stretch-backports Release' does not have a Release file.
603.1 W: The repository 'http://mirrors.163.com/debian-security stretch/updates Release' does not have a Release file.
603.1 E: Failed to fetch http://mirrors.163.com/debian/dists/stretch/main/source/Sources 404 Not Found
603.1 E: Failed to fetch http://mirrors.163.com/debian/dists/stretch-updates/main/source/Sources 404 Not Found
603.1 E: Failed to fetch http://mirrors.163.com/debian/dists/stretch-backports/contrib/source/Sources 404 Not Found
603.1 E: Failed to fetch http://mirrors.163.com/debian-security/dists/stretch/updates/main/source/Sources 404 Not Found
603.1 E: Some index files failed to download. They have been ignored
1、原因
这个镜像地址所在的目录中找不到相应的资源,因此需要更换源。
2、更换源地址
/etc/apt/sources.list
使用如下源
deb http://archive.debian.org/debian/ stretch main non-free contrib
deb-src http://archive.debian.org/debian/ stretch main non-free contrib
deb http://archive.debian.org/debian-security/ stretch/updates main non-free contrib
deb-src http://archive.debian.org/debian-security/ stretch/updates main non-free contrib
deb http://archive.debian.org/debian/ stretch-backports main non-free contrib
deb-src http://archive.debian.org/debian/ stretch-backports main non-free contrib
3、继续执行docker-compose
发现有失败了。
二、更新过程中遇到NO_PUBKEY的问题
78.35 W: GPG error: http://archive.debian.org/debian stretch-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
78.35 W: The repository 'http://archive.debian.org/debian stretch-backports InRelease' is not signed.
1、将出现的NO_PUBKEY添加到dockerfile文件中
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9
继续执行1-3,如果你幸运,就成功了。
三、如果和我一样不幸,出现gnupg, gnupg2 没有安装的错误
0.215 E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
1、需要添加安装pnupg代码
RUN apt-get update && apt-get install -y gnupg2
继续执行1-3,就成功了
大功告成
祝好运