Docker Build Error: Temporary failure resolving 'deb.debian.org' and --with-freetype is not understood

Hi everyone,
I’m trying to build a Docker image for my Laravel application with the following system dependencies:

Install system dependencies

RUN apt-get update -y && apt-get install -y
curl
unzip
zip
git
libpng-dev
libjpeg-dev
libfreetype6-dev
zlib1g-dev
libicu-dev
libmariadb-dev

Then I try to configure and install PHP extensions:

right_arrow:
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
&& docker-php-ext-install gd gettext intl pdo_mysql

But I get the following error:
Temporary failure resolving ‘deb.debian.org
E: Command line option-- with-freetype is not understood in combination with the other options

:red_question_mark: What I’ve tried / Observed:

  • DNS resolution seems to fail during build (Temporary failure resolving 'deb.debian.org')
  • The --with-freetype flag is not recognized, even though I’m installing the required packages

:light_bulb: Has anyone encountered this or knows how to fix it?

  • Could it be a networking issue with Docker?
  • Or a syntax error in the docker-php-ext-configure line?

Thanks in advance for your help!


Please, format your post according to the following guide: How to format your forum posts
In short: please, use </> button to share codes, terminal outputs, error messages or anything that can contain special characters which would be interpreted by the MarkDown filter. Use the preview feature to make sure your text is formatted as you would expect it and check your post after you have sent it so you can still fix it.

Example code block:

```
echo "I am a code."
echo "An athletic one, and I wanna run."
```

After fixing your post, please send a new comment so people are notified about the fixed content.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.