0

Seems like a really simple question.

But, I'm trying to create a docker container containing nginx and it breaks.

My dockerfile contains...

FROM ubuntu:14.04

RUN apt-get -qq update
RUN apt-get -yqq upgrade
RUN apt-get -f install
RUN apt-get -yq install --no-install-recommends nginx
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
RUN sed -i '/access_log/s|/[^;]\+|/dev/stdout|' /etc/nginx/nginx.conf
RUN sed -i '/error_log/s|/[^;]\+|/dev/stdout|' /etc/nginx/nginx.conf
RUN chmod 777 /dev/stdout

But partway through I get:

After this operation, 916 kB of additional disk space will be used.
Err http://archive.ubuntu.com/ubuntu/ trusty-updates/main libfreetype6 amd64 2.5.2-1ubuntu2.2
  404  Not Found [IP: 91.189.91.24 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/f/freetype/libfreetype6_2.5.2-1ubuntu2.2_amd64.deb  404  Not Found [IP: 91.189.91.24 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
2015/03/23 21:58:01 The command [/bin/sh -c apt-get -yq install libfreetype6] returned a non-zero code: 100

I assume this is a bug. I don't have time to file a bug report and just need this working really soon.

I'm not sure why nginx even depends on freetype. Is there perhaps a way to install this without freetype and still have nginx work?

1

There are multiple nginx packages available. The default, nginx-core, depends on some font-related packages which bring in libfreetype6. The smallest one,nginx-light doesn't depend on libfreetype6:

$ apt-rdepends nginx-light | grep freetype 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
$ 

So, for a quick fix, install nginx-light.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.