[ad_1]
I’m getting error whenever I’m running the below Dockerfile ERROR – ‘/bin/sh -c a2enmod rewrite returned a non zero code:127
#FROM php:8.0-apache
#FROM ubuntu:22.04
#FROM php:8.1.7RC1-apache
FROM php:8.1-rc-alpine3.16
#RUN apt-get update -y && apt-get install -y tzdata && apt-get -y install apache2 php-mysqli
RUN apk update
RUN apk upgrade
RUN apk add apache2-utils
COPY foo/ /var/www/html/
RUN chmod -R 777 /var/www/html/wp-content/uploads
RUN chmod 777 /var/www/html/.htaccess
COPY config/ports.conf /etc/apache2/
COPY config/sites-available/000-default.conf /etc/apache2/sites-available/
COPY config/sites-enabled/000-default.conf /etc/apache2/sites-enabled/
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
RUN a2enmod rewrite
[ad_2]