When I try to connect php whith the container that has the mysql server I get this error This is the docker compose file: This is the connection class: Now that I changed the host to 127.0.0.1, the connection is refused. And there’s no way that the MySQL server isn’t running, cause i can connect to it using php-server, but
Tag: docker
How to refresh changes in swoole PHP
I created one folder with two files, one is index.php and one is Dockerfile and in terminal I run php index.php and it started on http://127.0.0.1:9501/, but when I change hello world in something else, it doesn’t show new change on that link.. it stays hello world. I am trying to learn Swoole and I don’t know how to work
How to pull composer install inside docker container for Jfrog artifcatory
PHP package are install through Jfrog artifact URL using composer.json file. Need to get PHP package using composer install command inside docker container. This docker container manage by Jenkins pipeline. WHen I am doing locally it asked username and password on terminal Then it stored auth value under /home/vagrant/.composer/auth.json similar thing need to do in docker while deployment. what is
How to solve Laravel cant connect with mysql through docker
Im trying to deploy my laravel app using docker. Then I created docker-compose.yml file and Dockerfile like below. docker-compose.yml Dockerfile And when I try docker-compose up, all the containers run with a any error. And also when I run docker-compose ps, it shows like this, But, when laravel application, tries to connect with mysql, it doesnt happens. And even I
Symfony, Docker container fpm, apache : could not find driver [doctrine:database:create]
I’m trying to create symfony 5.4 project using docker with a container for apache, php fpm, symfony, mysql db. but actualy i don’t succed to create my database, i get this error: this doctrine conf : config/packages/doctrine.yaml: this is extensions activated : this my Docker-compose-stack-file: and My file .env: Answer Are you sure you are running php -m on the
How to enable php extensions when using the image php:7.2-apache with docker-compose?
I want to run a apache webserver with php extension inside container using docker compose as deployment. My compose file looks like this: how can I enable the following extensions. Answer First of all you can run php -m in php container to see installed and enabled modules. You can edit your docker-compose.yml like this: Create a file called Dockerfile
From which Dockerfile should composer install be called from
I need to call composer install and unsure from which Dockerfile to call it from – Dockerfile-apache or Dockerfile-php-fpm? Should I install composer in Dockerfile-apache (and PHP CLI?) and run it from there? Running composer install from Dockerfile-php-fpm gives me this: Composer could not find a composer.json file in /var/www/html Docker-php-fpm Docker-apache: Edit #1 docker-compose.yml Edit #2 This docker-compose file
How to enable output_buffering on wordpress official image
I’m taking my first steps with Docker, specifically with wordpress official image, which is just amazing to use. However, after installing (via docker-compose as below) and checking phpinfo() it appears that output_buffering = 0. I spent the weekend trying to find the best way to expose, or bind to php.ini to set it to on without success. Could I ask
“docker: invalid reference format” when downloading latest version of php
I’m running this command on the Docker PowerShell terminal. I am using VS Code. It gives a “docker: invalid reference format.” error message each time. Answer your code should work on terminal.. check on terminal. Try this
reload `procmgr` in container?
So I have a docker container build with buildpack that runs the following command under PID 1 is it possible to reload the configs passed into procmgr somehow? Answer At the time of writing this, no. The procmgr cli that is used here is very basic. https://github.com/paketo-buildpacks/php-web/blob/main/cmd/procmgr/main.go It loads the processes information listed in procs.yml, starts those processes, redirects all