概述
我刚在终端上制作了一个非常简单的docker文件,基本上我做了以下几点:
mkdir pgrouted
cd pgrouted
touch Dockerfile
现在我在nano编辑器中打开docker文件,然后将以下命令添加到docker文件中:
FROM ubuntu
MAINTAINER Gautam
LABEL Description="pgrouting excercise" Vendor="skanatek" Version="1.0"
ENV BBOX="-122.8,45.4,-122.5,45.6"
# Add pgRouting launchpad repository
RUN sudo apt-add-repository -y ppa:ubuntugis/ppa
RUN sudo apt-add-repository -y ppa:georepublic/pgrouting
RUN sudo apt-get update
# Install pgRouting package (for Ubuntu 14.04)
RUN sudo apt-get install postgresql-9.3-pgrouting
# Install osm2pgrouting package
RUN sudo apt-get install osm2pgrouting
# Install workshop material (optional, but maybe slightly outdated)
RUN sudo apt-get install pgrouting-workshop
# For workshops at conferences and events:
# Download and install from http://trac.osgeo.org/osgeo/wiki/Live_GIS_Workshop_Install
RUN wget --no-check-certificate https://launchpad.net/~georepublic/+archive/pgrouting/+files/pgrouting-workshop_2.0.6-ppa1_all.deb
RUN sudo dpkg -i pgrouting-workshop_2.0.6-ppa1_all.deb
# review:Not sure weather this should be in the dockerfile
RUN cp -R /usr/share/pgrouting/workshop ~/Desktop/pgrouting-workshop
# login as user "user"
RUN psql -U postgres
#create routing database
RUN CREATE DATABASE routing;
#add PostGIS functions
RUN CREATE EXTENSION postgis;
#add pgRouting core functions
CREATE EXTENSION pgrouting;
# Download using Overpass XAPI (larger extracts possible than with default OSM API)
wget --progress=dot:mega -O "sampledata.osm" "http://www.overpass-api.de/api/xapi?*[bbox=${BBOX}][@meta]"
整个Dockerfile可以一目了然地看到HERE。
现在,当我尝试构建dockerfile时,如下所示:
docker build -t gautam/pgrouted:v1 .
dockerfile运行,而不是我得到以下错误:
Step 4 : RUN sudo apt-add-repository -y ppa:ubuntugis/ppa
---> Running in c93c3c5fd5e8
sudo: apt-add-repository: command not found
The command '/bin/sh -c sudo apt-add-repository -y ppa:ubuntugis/ppa' returned a non-zero code: 1
有人可以告诉我为什么会收到此错误?
最后
以上就是壮观信封为你收集整理的linux 终端add-apt找不到命令,apt-add-repository:在Dockerfile中找不到命令错误的全部内容,希望文章能够帮你解决linux 终端add-apt找不到命令,apt-add-repository:在Dockerfile中找不到命令错误所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复