命令 '/bin/sh -c apt-get install erlang' 返回一个非零代码:1 [英] The command '/bin/sh -c apt-get install erlang' returned a non-zero code: 1
问题描述
我是 Docker 的初学者,我使用 Ubuntu 18.04 作为主机.在寻找解决方案时,我唯一得到的就是增加 VM 磁盘大小,因为它由于内存不足而发生.我没有使用虚拟机.可用磁盘大小为 87+ GB.
I am a beginner in Docker and am using Ubuntu 18.04 as a Host machine. While searching for the solution the only thing I got was to increase the VM disk size as it is happening due to low memory. I am not using a VM. Disk size available is 87+ GB.
以下是我的 docker 文件内容.
Below is my docker file content.
FROM ubuntu
RUN apt-get update
RUN apt-get install erlang
EXPOSE 15672
在触发构建时,我收到以下错误:
On triggering to build, I am getting the following error:
Sending build context to Docker daemon 1.694GB
Step 1/4 : FROM ubuntu
---> cd6d8154f1e1
Step 2/4 : RUN apt-get update
---> Using cache
---> 04473efa791a
Step 3/4 : RUN apt-get install erlang
---> Running in bb7a0664bb20
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
adwaita-icon-theme at-spi2-core ca-certificates ca-certificates-java dbus
dconf-gsettings-backend dconf-service default-jre-headless emacsen-common
erlang-asn1 erlang-base erlang-common-test erlang-corba erlang-crypto
.
.
.
notification-daemon openjdk-11-jre-headless openssl shared-mime-info
ubuntu-mono ucf x11-common xdg-user-dirs xkb-data
0 upgraded, 202 newly installed, 0 to remove and 1 not upgraded.
Need to get 137 MB of archives.
After this operation, 657 MB of additional disk space will be used.
Do you want to continue? [Y/n] Abort.
The command '/bin/sh -c apt-get install erlang' returned a non-zero code: 1
推荐答案
apt-get
要求您确认(您要继续吗?[Y/n] Abort.)显然是哪个 docker不愿付出.所以请改用 apt-get -y install erlang
.
apt-get
asked you for confirmation (Do you want to continue? [Y/n] Abort.) which docker was apparently unwilling to give. So use apt-get -y install erlang
instead.
这篇关于命令 '/bin/sh -c apt-get install erlang' 返回一个非零代码:1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!