Tag: php

How to write compile and make log in Dockerfile?

I put logging configure options into Dockerfile but logs file not created, why? This is correctly working in host OS, but not working in Docker. And to the source directory does not set permissions to the 777, but set 755. FROM ubuntu ENV PHP_VERSION 5.6.22 ENV PHP_PREFIX /opt/php/”$PHP_VERSION”/ … … ENV PHP_SRC /opt/src/php/ RUN mkdir […]

Docker: Curl errors when attempting to contact app in same container

I’ve got some problems with Docker and cURL. I have a Docker-compose container set as follow: app: image: busybox volumes: – /home/ben/dev/dummy/www/:/data/www/ – /home/ben/dev/dummy/logs/:/data/logapache/ – /home/ben/dev/dummy/flux-entrants/:/data/flux-entrants/ nginx: image: docker.dummy.fr/nginx volumes_from: – app ports: – 80:80 links: – php php: image: docker.dummy.fr/actus-php volumes_from: – app ports: – 9000:9000 links: – db – nosql db: image: docker.dummy.fr/mysql-5.6 […]

How can I test that a docker wordpress-fpm with custom plugins works

I have made The following Dockerfile: FROM wordpress:fpm ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update &&\ apt-get install -y unzip &&\ rm -rf /var/cache/apt/* ENV PLUGIN_URL https://downloads.wordpress.org/plugin ENV PIWIK_PLUGIN_VERSION 1.0.9 RUN curl -o /tmp/wp-piwik.${PIWIK_PLUGIN_VERSION}.zip ${PLUGIN_URL}/wp-piwik.${PIWIK_PLUGIN_VERSION}.zip &&\ unzip /tmp/wp-piwik.${PIWIK_PLUGIN_VERSION}.zip -d /tmp &&\ chown www-data:www-data /tmp/wp-piwik &&\ mv /tmp/wp-piwik /usr/src/wordpress/wp-content/plugins/&&\ find /usr/src/wordpress/wp-content/plugins/wp-piwik -type d -exec chmod 755 {} + […]

Redis as session storage for WordPress in docker

I’ve been trying to link Redis with WordPress in docker for a while now, but I can’t seem to get it to work. This is my Dockerfile : FROM wordpress:latest ENV PHPREDIS_VERSION 2.2.8 RUN apt-get update && apt-get install -yqq unzip git php5-redis RUN curl -L -o /tmp/redis.tar.gz https://github.com/phpredis/phpredis/archive/$PHPREDIS_VERSION.tar.gz \ && tar xfz /tmp/redis.tar.gz \ […]

Custom application directory in PHP-FPM container

I’m using the php:7-fpm Docker image but I cannot put my application in /var/www/html. Instead, I want to put it in /opt/foo. /opt/foo is a volume. How can I do this without replacing the whole PHP-FPM configuration?

remote server returned 400 bad request for apache2 in ubuntu

I am doing a file upload to my server in WPF. I am not showing this code because it worked for my localhost, so it seems like my server config is bad. My request arrives in this php script: upload.php: $target_dir = “/var/www/uploads/”; $target_file = $target_dir . $reg_id .”&”.$to .”&”. basename($_FILES[“file”][“name”]); $uploadOk = 1; $imageFileType […]

Laravel not working showing Apache default page on localhost. Virtual Host changes failed

I have to make LAravel app and to deliver a Dockerfile ,but i’m realy stuck with this. Before that I had a nightmare wile installing laravel on my machine. I’m trying to get dockervel image and I’m following the steps here: http://www.spiralout.eu/2015/12/dockervel-laravel-development.html I had problems before and made changes :Error starting userland proxy: listen tcp0.0.0.0:3306: […]

PHPUnit testing FAILS ONLY when visiting the root page( visit('/') ) in Laravel 5

I run Laravel applic ation in docker container dockervel and the test <?php use Illuminate\Foundation\Testing\WithoutMiddleware ; use Illuminate\Foundation\Testing\DatabaseMigrations ; use Illuminate\Foundation\Testing\DatabaseTransactions ; use App\User1; class MyTest extends TestCase { public function testExample() { $this->assertTrue(true); } public function providerAllUrisWithResponseCode() { return [ [‘/’, 200], [‘/thank’, 200], [‘/non-existing’, 404], ]; } public function testDisplayThankYou($value=”) { $this->visit(‘/thankyou’) ->see(‘THank […]

Installing cPhalcon on AWS Docker Image

I have a docker image that installs phalcon onto a Docker image. Here is the Dockerfile: FROM ubuntu:trusty MAINTAINER Fernando Mayo <fernando@tutum.co>, Feng Honglin <hfeng@tutum.co> # Install packages ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && \ sudo apt-get -y install supervisor php5-dev libpcre3-dev gcc make php5-mysql git curl unzip apache2 libapache2-mod-php5 mysql-server php5-mysql pwgen php-apc […]

How to install dependencies via Composer for Symfony project in Dockerfile?

I’ve met a problem related to making Docker container image, that contains Symfony base application. I can install php extensions without any problem (mcrypt, pdo_mysql, etc), but I can’t install dependencies via Composer. So… I’ve got, that I have problems related to caching and forming file autoload.php. I can’t understand why, but it tries connect […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.