Docker build returns exit code 100

I am really new to docker. Please understand that I am not familiar with the kernel and operating system.

I wrote the Dockerfile like this:

FROM php:8.0-fpm

RUN apt-get update && \
    apt-get install -y unzip gpg locales wget zlib1g-dev && \
    docker-php-ext-install pdo_mysql mysqli

RUN curl -sS https://getcomposer.org/installer | php && \
    mv composer.phar /usr/local/bin/composer

And then I ran the following command:

docker build -t docker_php:step1

Then it comes out like this:

=> [internal] load metadata for docker.io/library/php:8.1-fpm                                1.9s 
 => CACHED [1/3] FROM docker.io/library/php:8.1-fpm@sha256:4db042d1669ac7baef2887fb3c86faa64  0.0s 
 => ERROR [2/3] RUN apt-get udpate &&     apt-get install -y unzip gpg locales wget zlib1g-d  0.4s 
------
 > [2/3] RUN apt-get udpate &&     apt-get install -y unzip gpg locales wget zlib1g-dev &&     docker-php-ext-install pdo_mysql mysqli:
#5 0.335 E: Invalid operation udpate
------
executor failed running [/bin/sh -c apt-get udpate &&     apt-get install -y unzip gpg locales wget zlib1g-dev &&     docker-php-ext-install pdo_mysql mysqli]: exit code: 100

I started learning docker from yesterday and those commands are simply copied from the book I bought.

My operating system is Windows 10 Pro.

-For those who are suffering from this-

In my case, I created a Dockerfile in Visual Studio and used that command.

I changed CRLF to LF (End of Line Sequence) and gave the command.

So it’s solved!

2 Likes

There are typos (udpate). I accidentally pasted the wrong part in powershell. After the change, The result was same.