0

I have the following Dockerfile

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

When i run this Dockerfile i get the following outcome on step 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

The build fails at step 7. Why am i getting this error and what can i do to overcome it ?

Thank you.

Alex-z.

2
  • Are you running the build command behind proxy? Commented Sep 28, 2015 at 2:38
  • @BMW what do you mean by that ? Commented Sep 28, 2015 at 9:43

1 Answer 1

1

You are trying to use the PPA ppa:ubuntugis/ppa. When you are doing a apt-get update, apt-get is trying to fetch the list of available packets from this new source. However, this PPA has not been updated for a long time, and thus has no package available for the version of ubuntu you're using, trusty 14.4.

Here is the list of ubuntu version available for this PPA: http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/dists/

You can either start from an older ubuntu version (FROM ubuntu:12.04), or find another source providing the packages and the versions of postgis you need.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.