Category: docker

Bad permissions with docker & dockerfile

I have a Symfony project running under Docker container. This is the docker-compose & Dockerfile (only PHP parts): docker-compose.yml: version: ‘3.7’ services: php: build: context: . dockerfile: docker/php/Dockerfile volumes: – ‘./app/:/usr/src/app’ restart: on-failure user: 1000:1000 environment: APP_ENV: dev APP_DEBUG: 1…

Docker: need to persist folder in symfony project

I’m trying to dockerize my Symfony project. In this project, I have a folder under: public/fichiersflux/ “fichiersflux” is a folder with persistent data (img, pdf…) Here is the docker-compose.yml: version: ‘3.7’ services: mariadb: image: mariadb:10.4 restart: always environment: MYSQL_ROOT_PASSWORD: zfezZEFfz4e1589fze…

Symfony cache:clear when building a docker container or when running it first time?

I’m containerizing a symfony-3 application within a docker. Currently, I am copying a complete parameters.yml in function of a build ARG, so I can make 3 different builds: devel, pre and prod with 3 different config files. I already know…

Exit with code 1 due to network error: ConnectionRefusedError when generating PDF file from symfony running in Docker

I am trying to generate a pdf from a twig page by using snappy bundle with wkhtmltopdf,: $pageUrl = $command->getRouter()->generate(‘testDevis’,array(‘idDevis’=>$command->getIdDevis()),UrlGeneratorInterface::ABSOLUTE_URL); return new PdfResponse( $command->getPdfService()->getOutput($pageUrl), $nomDevis ); where $pageUrl = http://127.0.0.1:9999/test/1.I believe the problem came from Docker, where I have configured…

Can’t link symfony app container to mysql container

I have a tow running containers one with symfony app and the other is mysql database server: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 99d17c328612 sbc/gestcom:1.0 “docker-php-entrypoi…” 18 hours ago Up 2 minutes 0.0.0.0:4400->80/tcp musing_moser 97dafcfb4acd mysql “docker-entrypoint.s…” 18…