What is the correct syntax to add a PHP version in docker file?
i have this syntax:
FROM --platform=linux/x86-64 alpine:3.11 php:7.4-fpm-alpine
WORKDIR /app
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
RUN apk --no-cache add tzdata && \
cp /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
echo "UTC" | tee /etc/timezone && \
apk del tzdata
RUN apk --update add wget \
curl \
git \
php7 \
php7-opcache \
php7-ctype \
php7-xml \
php7-xmlreader \
php7-xmlwriter \
php7-tokenizer \
php7-pcntl \
php7-json \
php7-dom \
php7-zip \
php7-gd \
php7-curl \
php7-mbstring \
php7-redis \
php7-posix \
php7-mcrypt \
php7-iconv \
php7-pdo_mysql \
php7-phar \
php7-simplexml \
php7-openssl \
php7-sockets \
php7-fileinfo && rm /var/cache/apk/*
The problem with this syntax is I am getting an error on this line:
FROM --platform=linux/x86-64 alpine:3.11 php:7.4-fpm-alpine
What is the correct syntax to add a PHP version in my docker file?
Thanks!