0
我有以下Dockerfile錯誤而試圖建立custome Postgres的碼頭工人形象
FROM ubuntu:14.04
MAINTAINER Mike Dillon <[email protected]>
ENV POSTGIS_MAJOR 2.1
ENV POSTGIS_VERSION 2.1.7+dfsg-3~94.git954a8d0.pgdg80+1
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:ubuntugis/ppa
# temporary instruction, i beleive all the apt-get etc commands will need to be RUN in th$
# RUN -t -i ubuntu:14.04 /bin/bash
RUN apt-get install -y postgresql-client
RUN apt-get update && apt-get install -y --no-install-recommends postgresql-$PG_MAJOR-pos$
#RUN apt-get update && apt-get install -y --no-install-recommends postgresql-$PG_MAJOR-p$
#postgis=$POSTGIS_VERSION && rm -rf /var/lib/apt/lists/*
RUN mkdir -p /docker-entrypoint-initdb.d
當我運行此Dockerfile我得到步驟7下面的結果:
Step 7 : RUN apt-get update && apt-get install -y --no-install-recommends postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION postgis=$POSTGIS_VERSION && rm -rf /var/lib/apt/lists/*
---> Running in 8b0e852f7999
Ign http://ppa.launchpad.net trusty InRelease
Ign http://archive.ubuntu.com trusty InRelease
Ign http://ppa.launchpad.net trusty Release.gpg
Ign http://archive.ubuntu.com trusty-updates InRelease
Ign http://ppa.launchpad.net trusty Release
Ign http://archive.ubuntu.com trusty-security InRelease
Err http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty Release.gpg
Err http://ppa.launchpad.net trusty/main amd64 Packages
Err http://ppa.launchpad.net trusty/main amd64 Packages
Get:1 http://archive.ubuntu.com trusty-updates Release.gpg [933 B]
Err http://ppa.launchpad.net trusty/main amd64 Packages
Get:2 http://archive.ubuntu.com trusty-security Release.gpg [933 B]
Err http://ppa.launchpad.net trusty/main amd64 Packages
404 Not Found
Hit http://archive.ubuntu.com trusty Release
Get:3 http://archive.ubuntu.com trusty-updates Release [63.5 kB]
Get:4 http://archive.ubuntu.com trusty-security Release [63.5 kB]
Get:5 http://archive.ubuntu.com trusty/main Sources [1335 kB]
Get:6 http://archive.ubuntu.com trusty/restricted Sources [5335 B]
Get:7 http://archive.ubuntu.com trusty/universe Sources [7926 kB]
Get:8 http://archive.ubuntu.com trusty/main amd64 Packages [1743 kB]
Get:9 http://archive.ubuntu.com trusty/restricted amd64 Packages [16.0 kB]
Get:10 http://archive.ubuntu.com trusty/universe amd64 Packages [7589 kB]
Get:11 http://archive.ubuntu.com trusty-updates/main Sources [296 kB]
Get:12 http://archive.ubuntu.com trusty-updates/restricted Sources [4521 B]
Get:13 http://archive.ubuntu.com trusty-updates/universe Sources [174 kB]
Get:14 http://archive.ubuntu.com trusty-updates/main amd64 Packages [782 kB]
Get:15 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [22.7 kB]
Get:16 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [415 kB]
Get:17 http://archive.ubuntu.com trusty-security/main Sources [121 kB]
Get:18 http://archive.ubuntu.com trusty-security/restricted Sources [1874 B]
Get:19 http://archive.ubuntu.com trusty-security/universe Sources [35.4 kB]
Get:20 http://archive.ubuntu.com trusty-security/main amd64 Packages [434 kB]
Get:21 http://archive.ubuntu.com trusty-security/restricted amd64 Packages [14.8 kB]
Get:22 http://archive.ubuntu.com trusty-security/universe amd64 Packages [151 kB]
Fetched 21.2 MB in 1min 30s (233 kB/s)
W: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION postgis=$POSTGIS_VERSION && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
構建步驟失敗7.爲什麼我得到這個錯誤,我能做些什麼來克服它?
謝謝。
亞歷-Z。
你是否在代理後面運行build命令? – BMW
@寶馬你是什麼意思? –