Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The command '/bin/sh -c apt-get install erlang' returned a non-zero code: 1

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.

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
like image 708
Pratik Avatar asked Nov 05 '25 02:11

Pratik


1 Answers

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.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!