2

I have the following docker-composer.yml

apache:
    domainname: dev
    hostname: server
    image: arm32v7/httpd:2.4
    depends_on:
      - php
      - mysql
    networks:
      frontend:
        aliases:
          - apache
          - server.dev
      backend:
        aliases:
          - apache
    privileged: true
    ports:
      - "8880:80"
    working_dir: /var/www/html
    volumes:
networks:
  frontend:
  backend:

I can access the docker container from external network using the host's ip address/ port but not via the url server.dev:8880

How do I access a container using it's domain name in docker-compose?

Kendall
  • 247
  • 1
  • 3
  • 13

0 Answers0