DockerFile:
DIN php:7.2-apache
RUN apt-get update && apt-get install -y
RUN docker-php-ext-install mysqli pdo_mysql
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
RUN mkdir -p /app \
&& mkdir -p /app/moe-php-mysql-demo \
&& mkdir -p /app/moe-php-mysql-demo/www
#WORKDIR ./www
COPIE . /app/moe-php-mysql-demo/www
RUN cp -r /app/moe-php-mysql-demo/www/* /var/www/html/.
RUN chmod -R 0755 /var/www/html/cuestionario/
RUN apt install nano
docker-compose.yml
versiunea: "3.2"
Servicii:
php:
#construi:
# context: .
#imagine: amakundu/moe-php-mysql-demo:1.0.0
#imagine: php:7.2-apache
construi:
context: .
dockerfile: ./Dockerfile
retele:
- în față
- backend
mediu inconjurator:
- MYSQL_HOST=moe-mysql-app
- MYSQL_USER=moeuser
- MYSQL_PASSWORD=moepass
- MYSQL_DB=moe_db
#volume:
#- ./www/:/var/www/html/
#- ./php.ini:/usr/local/etc/php/php.ini
porturi:
- „80:80”
container_name: moe-php-app
mysql:
imagine: mysql:5.7
#comandă: „docker-php-ext-install mysqli”
retele:
- backend
mediu inconjurator:
- MYSQL_ROOT_PASSWORD=parola rădăcină
- MYSQL_USER=moeuser
- MYSQL_PASSWORD=moepass
- MYSQL_DATABASE=moe_db
container_name: moe-mysql-app
phpmyadmin:
imagine: phpmyadmin/phpmyadmin:4.7
depinde de:
- mysql
retele:
- backend
porturi:
- „30002:80”
mediu inconjurator:
- PMA_HOST=moe-mysql-app
- PMA_PORT= 3306
- MAX_EXECUTION_TIME = 0
- MEMORY_LIMIT = 512 M
- UPLOAD_LIMIT = 512 M
volume:
- /sesiuni
container_name: moe-phpmyadmin-app
retele:
în față:
backend:
imaginea bug-ului
/chaea
Am incercat cu windows 10 xampp si merge. Dar nu cu ubuntu