-1

Can I use php container to execute scripts from other container. If I can how can I do it or what I do wrong

Dockerfile:

FROM ubuntu:14.04

RUN apt-get update && apt-get install -y apache2

ADD docker/apache2/apache-config.conf /etc/apache2/sites-enabled/000-default.conf

ADD docker/hosts /etc/hosts

CMD /usr/sbin/apache2ctl -D FOREGROUND

fig:

app:
    build: .
    volumes:
      - .:/var/www/
    ports:
      - "80:80"
    links:
       - php
php:
    image: php:5.6
    volumes:
      - .:/var/www/
Céline Aussourd
  • 10,214
  • 4
  • 32
  • 36
wojtusthc
  • 1
  • 1

1 Answers1

0

I'm not sure what you are trying to do but if you want to run PHP in conjunction with Apache, the image php:5.6-apache might be more appropriate (See: https://registry.hub.docker.com/u/library/php/)

In this case you would have only 1 container (no links).

Céline Aussourd
  • 10,214
  • 4
  • 32
  • 36