Docker Community Forums

Share and learn in the Docker community.

Unable to connect to memcached server

docker

(Sau226) #1

Hey,

I am a user of docker. Recently I was trying to spawn a small container farm based off docker. I’m currently unable to connect to the memcache container from my php container via the usual container alias (in this case memcached). I can connect however using IP but would prefer not to need to do so.

Does anyone have any advice for this? The relevant sections of my docker-compose.yml are below for your reference:

php-internal:
image: php-internal-dev
volumes:
  - ../../../file1:/usr/internal/srv1/current/src
  - ../../../file1:/usr/internal/source/sourcesite
  - ../../../config:/usr/internal/srv1/current/config
  - ../../../cache:/usr/internal/srv1/current/cache

memcached:
    image: memcached:alpine

Regards,

sau226