Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker & Laravel : configure: error: Package requirements (oniguruma) were not met

Can anyone help me with this problem.

When i try to create a docker image from a dockerfile for laravel application i get this error:

checking for oniguruma... no configure: error: Package requirements (oniguruma) were not met:

No package 'oniguruma' found  Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.  Alternatively, you may set the environment variables ONIG_CFLAGS and ONIG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. 

The command '/bin/sh -c docker-php-ext-install pdo mbstring' returned a non-zero code: 1

Here is my Dockerfile:

FROM php:7 RUN apt-get update -y && apt-get install -y openssl zip unzip git RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer RUN docker-php-ext-install pdo mbstring WORKDIR /app COPY app /app # this copies all the app files to a folder called `app` RUN composer install  CMD php artisan serve --host=0.0.0.0 --port=8000 EXPOSE 8000 

and the docker command to build the Dockerfile

sudo docker build -t test . 
like image 500
Amy Murphy Avatar asked Dec 09 '19 14:12

Amy Murphy


People also ask

What's Docker used for?

Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications.

What is Docker vs Kubernetes?

Docker is a company which provides a set of tools for building and sharing container images, and running containers at both small and large scale. Kubernetes is a tool which manages (“orchestrates”) container-based applications running on a cluster of servers.

Is Docker a Python?

Docker is a containerization tool used for spinning up isolated, reproducible application environments. It is a popular development tool for Python developers. The tutorials and articles here will teach you how to include Docker to your development workflow and use it to deploy applications locally and to the cloud.

What is Docker in AWS?

Docker is an operating system for containers. Similar to how a virtual machine virtualizes (removes the need to directly manage) server hardware, containers virtualize the operating system of a server. Docker is installed on each server and provides simple commands you can use to build, start, or stop containers.


1 Answers

What @kalatabe said is correct. But in case you absolutely wanted to make sure mbstring gets installed, you can also add libonig-dev to your apt-get install

like image 137
kgx Avatar answered Oct 04 '22 06:10

kgx