I want to make an image to install a project in laravel. All this just for the measure of learning.
My point is, I want to run the composer install
command in the bash of the container.
This is my Dockerfile
FROM php:5.6
WORKDIR /app
ADD ./composer.json /app
I start from an image of php 5.6 because I already have php 7 in my machine and I want to see the operation with a php that does not have installed in my machine
This is my docker-compose.yaml
version: '2'
services:
composer:
image: "composer"
volumes:
- .:/app
web:
build: .
ports:
- "8080:80"
IMPORTANT POINT : I want to use composer from
docker-compose
and not from Dokerfile. I know I can run theRUN
and install it with the documentation commands, but my goal is to use it withdocker-compose
.