无法在 docker debian:jessie 中安装软件包 [英] Can not install package within docker debian:jessie
本文介绍了无法在 docker debian:jessie 中安装软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在基于 debian 的容器中安装 git
I am tryint to install git within debian based container
postgres 镜像基于 debian:jessie
postgres image is based on debian:jessie
码头文件
FROM postgres:9.4
RUN apt-get -qq update
RUN apt-get install git-core
RUN apt-get install osm2pgsql
git和osm2pgsql都找不到
Both git and osm2pgsql can not be located
错误
E: Unable to locate package git-core
我错过了什么?
推荐答案
我不知道是什么导致了无法定位包"错误,但是您的 apt-get
调用丢失了 -y
,表示你将得到:
I don't what's causing the 'unable to locate package' error, but your apt-get
invocations are missing -y
, which means you're going to get:
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
否则,您的 Dockerfile 对我来说工作得很好:
Otherwise, your Dockerfile worked just fine for me:
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
这篇关于无法在 docker debian:jessie 中安装软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文