I use following code to add gdal to my docker image:
FROM node:7-onbuild
RUN apt-get -y update && apt-get -y install software-properties-common
python-software-properties
RUN add-apt-repository ppa:ubuntugis/ppa
RUN apt-get -y update && apt-get -y install gdal-bin
It always returns error when executing apt-get -y update
after add-apt-repository
:
W: Failed to fetch
http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/dists/jessie/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
I have added --no-cache
when executing docker build
.
Any idea about the error?
That is because the node image is debian jessie based. The ppa you have added is for ubuntu different versions and not debian
Thats why your url gives a 404. You can check in browser too " http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/dists/jessie/main/binary-amd64/Packages "
You need to find a debian:jessie ppa for the packages you are interested in
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.