K
K
knowledge2019-01-08 22:12:56
Docker
knowledge, 2019-01-08 22:12:56

How can I access the php included in docker-compose inside the container?

there is an image with debian, nginx is installed inside
via docker-compose php is connected

version: "3"
services:
  web:
    image: deb-nginx.loc
    ports:
      - "8888:80"
    volumes:
      - .:/app
      - ./docker/nginx/conf/newblog.loc:/etc/nginx/sites-enabled/newblog.loc
    links:
      - php
  php:
    image: php.loc
    volumes:
      - .:/app
    ports:
      - "9000:9000"

I go inside the container, I enter `php`, but it says php is not installed
how can I access it, how is it done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
ivankomolin, 2019-01-08
@ivankomolin

If inside the container when you run any command, the console reports that the program is not installed, then it is so)
Bring the contents of the Dockerfile of the php.loc image to make sure that php-cli is not installed there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question