Markdown editing packages running under react generate visual bugs when built in a docker image (api platform app)

I have an API running under PHP Symfony 6.4 with the API Platform overlay. The back office of this application runs under next 12 with React admin.
I have a package in my back office allowing me to edit Markdown in order to create personalized popup messages.

In this application, my back office works very well when I deploy it “the old way” on an Ubuntu server or when I launch it locally on Ubuntu, Mac OS or WSL2 when I use a Docker compose.
On the other hand, when I launch a Dockerfile which contains the entire App to deploy my API + my back office in a single image. The Markdown editor no longer works properly and I have visual bugs that prevent me from editing posts correctly. When I build locally via “docker build”, I have the problem just like when I deploy under Kurbernetes.

Here is my Dokcerfile :

# Description: Dockerfile for the API Platform application
ARG PHP_VERSION=8.3
ARG NODE_VERSION=16.20

########################################################################################
# Step 1: Build PHP from linux/amd64
FROM --platform=linux/amd64 php:${PHP_VERSION}-fpm as php_builder

# Install necessary dependencies for API Platform & nginx
RUN apt-get update && apt-get install --no-install-recommends -y 
    libicu-dev 
    libpq-dev 
    libzip-dev 
    unzip 
    nginx 
    gnupg 
    software-properties-common 
    && docker-php-ext-install 
    intl 
    pdo 
    pdo_pgsql 
    zip 
    && apt-get clean 
    && rm -rf /var/lib/apt/lists/*
    
# Install Composer 
RUN curl -sS https://getcomposer.org/installer | php -- --disable-tls && 
    mv composer.phar /usr/local/bin/composer

# Set the working directory
WORKDIR /var/www/app

# Copy the project files into the working directory
COPY . .

# Install dependencies with Composer
WORKDIR /var/www/app/api
ENV COMPOSER_ALLOW_SUPERUSER=1
ENV PATH="${PATH}:/root/.composer/vendor/bin"
COPY api/composer.json api/composer.lock api/symfony.lock ./
RUN set -eux 
    composer install --prefer-dist --no-dev --no-scripts --no-progress 
    composer clear-cache

RUN set -eux; 
    mkdir -p var/cache var/log; 
    composer dump-autoload --classmap-authoritative --no-dev; 
    chmod +x bin/console; sync
RUN composer install

# Generate the autoloading files
RUN composer dump-autoload --optimize

########################################################################################
# Step 2: Build the PWA
FROM --platform=linux/amd64 node:${NODE_VERSION}-alpine as pwa_builder
    
WORKDIR /var/www/app/pwa
COPY pwa/ /var/www/app/pwa/
# Installation des dépendances et construction de la PWA
RUN yarn install 
    && yarn build 
    && yarn next export

########################################################################################
# Step 3: Start of the production stage
FROM --platform=linux/amd64 php:${PHP_VERSION}-fpm-alpine as php_prod

# Set environment variables
ENV APP_ENV=prod 
    APP_DEBUG=0 
    PROJECT_DIRECTORY=my_app 
    PROJECT_DOMAIN=my_app 

# Install necessary dependencies for API Platform & nginx
RUN apk update && apk add --no-cache 
    icu-dev 
    postgresql-dev 
    libzip-dev 
    unzip 
    nginx 
    gnupg 
    && docker-php-ext-install 
    intl 
    pdo 
    pdo_pgsql 
    zip 
    && rm -rf /var/cache/apk/*
    
# Allow memory limit to the maximum available
RUN echo 'memory_limit = -1' >> /usr/local/etc/php/conf.d/docker-php-ram-limit.ini;

# Copy the necessary files from the builder stages
COPY --from=php_builder /var/www/app/api /var/www/$PROJECT_DIRECTORY/api
COPY --from=pwa_builder /var/www/app/pwa/out /var/www/$PROJECT_DIRECTORY/pwa/out

# Copy the Nginx configuration file for API Platform 
# it must match with the nginx alpine image
COPY docker/nginx.conf /etc/nginx/nginx.conf
COPY --chown=www-data:www-data . /var/www/$PROJECT_DIRECTORY
COPY /docker/docker-entrypoint.sh /etc/entrypoint.sh
RUN chmod +x /etc/entrypoint.sh

# Set the working directory
WORKDIR /var/www/$PROJECT_DIRECTORY

# Set permissions
RUN chmod -R 777 /var/www/$PROJECT_DIRECTORY/api
RUN chown -R www-data:www-data /var/www/$PROJECT_DIRECTORY/api

# Expose ports
EXPOSE 80

ENTRYPOINT ["/etc/entrypoint.sh"]

I tried another package and same problem, I had visual bugs.

    "react-markdown": "^9.0.1",
    "react-mde": "^11.5.0",

I also tried to install font packages on my alpine image to feed the package but It does not work. Then finaly, I tried to build on an Ubuntu image but it was unsuccessfull & the image was too big.

Have you ever encounter this kind of problem ?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật