drachtio-server
drachtio-server copied to clipboard
apt-get inoperable when extending drachtio-server docker image
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.
ah, ok I removed all that in order to create the smallest possible image size. Will look at putting it back in..
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.