drachtio-server icon indicating copy to clipboard operation
drachtio-server copied to clipboard

apt-get inoperable when extending drachtio-server docker image

Open jonastelzio opened this issue 3 years ago • 2 comments

Hey there!

I'm trying to install some basic extras into a docker container extending FROM drachtio/drachtio-server

This is my docker file:

FROM drachtio/drachtio-server

RUN apt-get update \
  && apt-get -y --quiet --force-yes upgrade \
  && apt-get install -y --no-install-recommends curl unzip jq

RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
RUN unzip awscliv2.zip
RUN ./aws/install

Basically I just need those three extra dependencies to install the AWS CLI tools (needed to obtain stuff from AWS Secrets Manager to configure drachtio server).

But, because of (I believe) these lines from the dockerfile in this repo, apt-get just fails:

  && rm -rf /var/lib/apt/* \
  && rm -rf /var/lib/dpkg/* \
  && rm -rf /var/lib/cache/* \
  && rm -Rf /var/lib/apt/lists/* \

The error apt is giving me:

#5 2.146 E: flAbsPath on /var/lib/dpkg/status failed - realpath (2: No such file or directory)
#5 2.146 E: Could not open file  - open (2: No such file or directory)
#5 2.146 E: Problem opening
#5 2.146 E: The package lists or status file could not be parsed or opened.

jonastelzio avatar Jun 30 '21 11:06 jonastelzio

ah, ok I removed all that in order to create the smallest possible image size. Will look at putting it back in..

davehorton avatar Jun 30 '21 11:06 davehorton

ah, ok I removed all that in order to create the smallest possible image size. Will look at putting it back in..

Yeah I suspected that was the intention! There doesn't seem to be any simple way to rebuild those directories. They appear to be a part of the distribution itself. Everything I can find about it, talks about restoring them from a backup if they're gone.

jonastelzio avatar Jun 30 '21 12:06 jonastelzio