Skip to content

Commit

Permalink
Complete docker container for lib
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-bednarek committed May 12, 2018
1 parent 5edc94b commit bce32eb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
13 changes: 12 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "nexilo/xdevapi-php",
"type": "library",
"description": "PHP Library to provide mysql-xdevapi functions",
"keywords": ["mysql", "api", "xdevapi", "storage", "nosql"],
"license": "GPL",
"authors": [
{
Expand All @@ -10,5 +11,15 @@
}
],
"minimum-stability": "dev",
"require": {}
"require": {
"php": "^7.1"
},
"autoload": {
"psr-4": {
"Nexilo\\": "src/Nexilo/"
}
},
"config": {
"sort-packages": true
}
}
10 changes: 2 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@ version: '3'
services:
php:
build: 'docker/php'
restart: always
volumes:
- "./:/var/www/html"

composer:
image: "composer"
tty: true
volumes:
- "./:/var/www/html"
command: install
- "./:/var/www/"

mysqldb:
image: mysql:${MYSQL_VERSION}
Expand Down
10 changes: 8 additions & 2 deletions docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
FROM nanoninja/php-fpm:7.1
FROM ubuntu:16.04

RUN apt-get update && apt-get -y install libboost-all-dev protobuf-compiler libprotobuf-dev
RUN apt update
RUN apt -y install build-essential libprotobuf-dev libboost-dev openssl protobuf-compiler software-properties-common vim mc
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y
RUN apt update
RUN apt -y install php7.1-cli php7.1-dev php7.1-mysql php7.1-pdo php7.1-xml composer
RUN pecl install mysql_xdevapi
RUN echo "extension=mysql_xdevapi.so" > /etc/php/7.1/cli/conf.d/30-mysqlxdevapi.ini

0 comments on commit bce32eb

Please sign in to comment.