Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6025

Why do I get "out of memory" when running apt-get in docker build

$
0
0

I'm trying to install ca-certificates in my docker container and really having no luck.I can apt-get update, and I can install some other packages, but not curl or ca-certificates. Further, if I run the ubuntu base container and exec -it into it, I can apt-get install ca-certificates there.

Dockerfile:

FROM ubuntu:latestENV http_proxy=http://my_proxy_that_probably_doesnt_matterRUN apt-get updateRUN apt-get install -y apt-utilsRUN apt-get install -y ca-certificates

Bash:

docker build .

And here is the log for this step:

RUN apt-get install -y ca-certificates:                                                                                 0.275 Reading package lists...                                                                                                   1.169 Building dependency tree...1.346 Reading state information...1.600 The following additional packages will be installed:1.600   openssl1.628 The following NEW packages will be installed:1.630   ca-certificates openssl1.733 0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.1.733 Need to get 1161 kB of archives.1.733 After this operation, 2324 kB of additional disk space will be used.1.733 Get:1 http://archive.ubuntu.com/ubuntu noble/main amd64 openssl amd64 3.0.13-0ubuntu3 [1002 kB]1.753 Get:2 http://archive.ubuntu.com/ubuntu noble/main amd64 ca-certificates all 20240203 [159 kB]1.909 debconf: unable to initialize frontend: Dialog1.909 debconf: (TERM is not set, so the dialog frontend is not usable.)1.909 debconf: falling back to frontend: Readline1.910 debconf: unable to initialize frontend: Readline1.910 debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC entries checked: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.38.2 /usr/local/share/perl/5.38.2 /usr/lib/x86_64-linux-gnu/perl5/5.38 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.38 /usr/share/perl/5.38 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 8, <STDIN> line 2.)1.910 debconf: falling back to frontend: Teletype1.917 dpkg-preconfigure: unable to re-open stdin: 1.963 Fetched 1161 kB in 0s (10.4 MB/s)1.978 Selecting previously unselected package openssl.(Reading database ... 4937 files and directories currently installed.)1.986 Preparing to unpack .../openssl_3.0.13-0ubuntu3_amd64.deb ...1.987 Unpacking openssl (3.0.13-0ubuntu3) ...2.032 Selecting previously unselected package ca-certificates.2.033 Preparing to unpack .../ca-certificates_20240203_all.deb ...2.034 Unpacking ca-certificates (20240203) ...2.089 Setting up openssl (3.0.13-0ubuntu3) ...2.093 Setting up ca-certificates (20240203) ...2.179 debconf: unable to initialize frontend: Dialog2.179 debconf: (TERM is not set, so the dialog frontend is not usable.)2.179 debconf: falling back to frontend: Readline2.179 debconf: unable to initialize frontend: Readline2.179 debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC entries checked: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.38.2 /usr/local/share/perl/5.38.2 /usr/lib/x86_64-linux-gnu/perl5/5.38 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.38 /usr/share/perl/5.38 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 8.)2.179 debconf: falling back to frontend: Teletype2.806 Updating certificates in /etc/ssl/certs...3.577 out of memory3.578 out of memory3.578 out of memory3.578 out of memory3.578 out of memory3.578 out of memory3.578 out of memory3.578 out of memory3.578 out of memory3.579 out of memory3.579 out of memory3.579 out of memory3.579 out of memory3.579 out of memory3.579 out of memory3.579 out of memory3.579 out of memory3.580 out of memory3.580 out of memory3.580 out of memory3.580 out of memory3.580 out of memory3.580 out of memory3.580 out of memory3.581 out of memory3.581 out of memory3.581 out of memory3.581 out of memory3.581 out of memory3.581 out of memory3.581 out of memory3.582 out of memory3.582 out of memory3.582 out of memory3.582 out of memory3.582 out of memory3.582 out of memory3.583 out of memory3.583 out of memory3.583 out of memory3.583 out of memory3.583 out of memory3.584 out of memory3.584 out of memory3.584 out of memory3.585 out of memory3.585 out of memory3.585 out of memory3.585 out of memory3.585 out of memory3.585 out of memory3.585 out of memory3.585 out of memory3.586 out of memory3.586 out of memory3.586 out of memory3.586 out of memory3.586 out of memory3.586 out of memory3.586 out of memory3.587 out of memory3.587 out of memory3.587 out of memory3.587 out of memory3.587 out of memory3.587 out of memory3.587 out of memory3.587 out of memory3.587 out of memory3.587 out of memory3.587 out of memory3.588 out of memory3.588 out of memory3.588 out of memory3.588 out of memory3.588 out of memory3.588 out of memory3.588 out of memory3.589 out of memory3.589 out of memory3.589 out of memory3.589 out of memory3.589 out of memory3.589 out of memory3.589 out of memory3.589 out of memory3.589 out of memory3.589 out of memory3.590 out of memory3.590 out of memory3.590 out of memory3.590 out of memory3.590 out of memory3.590 out of memory3.590 out of memory3.590 out of memory3.591 out of memory3.591 out of memory3.591 out of memory3.591 out of memory3.591 out of memory3.591 out of memory3.591 out of memory3.591 out of memory3.591 out of memory3.592 out of memory3.592 out of memory3.592 out of memory3.592 out of memory3.592 out of memory3.592 out of memory3.592 out of memory3.592 out of memory3.593 out of memory3.593 out of memory3.593 out of memory3.593 out of memory3.593 out of memory3.593 out of memory3.593 out of memory3.593 out of memory3.594 out of memory3.594 out of memory3.594 out of memory3.594 out of memory3.594 out of memory3.594 out of memory3.594 out of memory3.594 out of memory3.594 out of memory3.594 out of memory3.595 out of memory3.595 out of memory3.595 out of memory3.595 out of memory3.595 out of memory3.595 out of memory3.595 out of memory3.595 out of memory3.596 out of memory3.596 out of memory3.596 out of memory3.596 out of memory3.596 out of memory3.596 out of memory3.596 out of memory3.610 dpkg: error processing package ca-certificates (--configure):3.610  installed ca-certificates package post-installation script subprocess returned error exit status 1463.613 Errors were encountered while processing:3.613  ca-certificates3.630 E: Sub-process /usr/bin/dpkg returned an error code (1)------Dockerfile:7--------------------   5 |     RUN apt-get update   6 |     RUN apt-get install -y dialog apt-utils gnupg lsb-release   7 | >>> RUN apt-get install -y ca-certificates--------------------ERROR: failed to solve: process "/bin/sh -c apt-get install -y ca-certificates" did not complete successfully: exit code: 100

Viewing all articles
Browse latest Browse all 6025

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>