2015-08-05 34 views
5

Tôi tryint để cài đặt git trong container debian dựaKhông thể cài đặt gói trong Docker debian: jessie

postgres hình ảnh dựa trên debian: jessie

dockerfile

FROM postgres:9.4 


RUN apt-get -qq update 

RUN apt-get install git-core 
RUN apt-get install osm2pgsql 

Cả hai git và osm2pgsql không thể được đặt

lỗi

E: Unable to locate package git-core 

Tôi đã bỏ lỡ điều gì?

+0

lỗi thời. "Gói 'git-core' đã được đổi tên thành 'git'" https://packages.debian.org/jessie/git-core – helmi03

Trả lời

17

tôi không những gì đang gây ra 'không thể xác định vị trí gói' lỗi, nhưng apt-get bạn invocations đang thiếu -y, có nghĩa là bạn sẽ nhận được:

After this operation, 33.8 MB of additional disk space will be used. 
Do you want to continue? [Y/n] Abort. 
The command '/bin/sh -c apt-get install git-core' returned a non-zero code: 1 

Nếu không, Dockerfile của bạn chỉ làm việc tốt cho tôi:

Step 1 : RUN apt-get -qq update 
---> Running in 0430a990fa81 
---> 54f88a02d81e 
Removing intermediate container 0430a990fa81 
Step 2 : RUN apt-get install git-core 
---> Running in 0fdad2e3c35b 
Reading package lists... 
Building dependency tree... 
Reading state information... 
The following extra packages will be installed: 
    ca-certificates git git-man less libcurl3-gnutls liberror-perl libidn11 
    librtmp1 libssh2-1 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 
    libxmuu1 openssh-client patch rsync xauth 
Suggested packages: 
    gettext-base git-daemon-run git-daemon-sysvinit git-doc git-el git-email 
    git-gui gitk gitweb git-arch git-cvs git-mediawiki git-svn ssh-askpass 
    libpam-ssh keychain monkeysphere ed diffutils-doc openssh-server 
Recommended packages: 
    ssh-client 
The following NEW packages will be installed: 
    ca-certificates git git-core git-man less libcurl3-gnutls liberror-perl 
    libidn11 librtmp1 libssh2-1 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 
    libxext6 libxmuu1 openssh-client patch rsync xauth 
0 upgraded, 21 newly installed, 0 to remove and 1 not upgraded. 
Need to get 8,059 kB of archives. 
After this operation, 33.8 MB of additional disk space will be used. 
Do you want to continue? [Y/n] Abort. 
The command '/bin/sh -c apt-get install git-core' returned a non-zero code: 1 
ERROR: failed to build larsks/sodocker:latest 
Các vấn đề liên quan