title: No response from varnish docker container
body: <p>I'm tying to run varnish on <a href="https://github.com/laradock/laradock" rel="nofollow noreferrer">Laradock</a>.
  I took varnish configuration from <a href="https://hub.docker.com/_/varnish" rel="nofollow noreferrer">docker hub</a>.</p>
  
  <p>The problem is that there is no even 503 error and no logs in the varnish log. 
  80 port is only for varnish (nginx container is deaktivated off for test).
  If nginx container is activated on port 80 then i can reach website without problem.</p>
  
  <p>Does any have an idea why varnish container is not reachable at all? And what is the next step to make research there?</p>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM varnish:6.3
  
  # Set Environment Variables
  ENV DEBIAN_FRONTEND noninteractive
  
  # Install Dependencies
  #RUN apt-get update &amp;&amp; apt-get install -y apt-utils &amp;&amp; apt-get upgrade -y
  #RUN mkdir /home/site &amp;&amp; mkdir /home/site/cache
  #RUN apt-get install -y varnish
  #RUN rm -rf /var/lib/apt/lists/*
  
  # Setting Configurations
  ENV VARNISH_CONFIG  /etc/varnish/default.vcl
  ENV CACHE_SIZE      128m
  ENV VARNISHD_PARAMS -p default_ttl=3600 -p default_grace=3600
  ENV VARNISH_PORT    6081
  ENV BACKEND_HOST    localhost
  ENV BACKEND_PORT    80
  
  COPY default.vcl /etc/varnish/default.vcl
  COPY start.sh /etc/varnish/start.sh
  
  RUN chmod +x /etc/varnish/start.sh
  
  CMD ["/etc/varnish/start.sh"]
  
  EXPOSE 8080
  </code></pre>
  
  <p>default.vcl:</p>
  
  <pre><code>vcl 4.1;
  
  backend default {
    .host = "8080";
    .port = "localhost"; // tried 127.0.0.1, workspace, server IP.
  }
  </code></pre>
  
  <p>start.sh:   </p>
  
  <pre><code> #!/usr/bin/env bash
  set -e
  
  for name in BACKEND_PORT BACKEND_HOST VARNISH_SERVER
  do
      eval value=\$$name
      sed -i "s|\${${name}}|${value}|g" /etc/varnish/default.vcl
  done
  
  echo "exec varnishd \
      -a :$VARNISH_PORT \
      -T 127.0.0.1:6082 \
      -F \
      -f $VARNISH_CONFIG \
      -s malloc,$CACHE_SIZE \
      $VARNISHD_PARAMS"
  
  exec bash -c \
      "exec varnishd \
      -a :$VARNISH_PORT \
      -T 127.0.0.1:6082 \
      -F \
      -f $VARNISH_CONFIG \
      -s malloc,$CACHE_SIZE \
      $VARNISHD_PARAMS"
  </code></pre>
  
  <p>docker-compose.yml:</p>
  
  <pre><code>version: '3'
  
  networks:
    frontend:
      driver: bridge
    backend:
      driver: bridge
  
  volumes:
    percona:
      driver: local
  
  services:
  
    ### Workspace Utilities ##################################
    workspace:
      container_name: workspace
      build:
        context: ./workspace
        args:
          - LARADOCK_PHP_VERSION=7.2
          - http_proxy
          - https_proxy
          - no_proxy
      volumes:
        - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
      extra_hosts:
        - "dockerhost:${DOCKER_HOST_IP}"
      ports:
        - "2222:22"
      tty: true
      environment:
        - PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
        - DOCKER_HOST=tcp://docker-in-docker:2375
      networks:
        - frontend
        - backend
      links:
        - docker-in-docker
  
    ### NGINX Server #########################################
    nginx:
      container_name: Nginx
      build:
        context: ./nginx
        args:
          - PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
          - VARNISH_UPSTREAM_CONTAINER=${VARNISH_PROXY1_BACKEND_HOST}
          - PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
          - VARNISH_UPSTREAM_PORT=80
          - CHANGE_SOURCE=${CHANGE_SOURCE}
          - http_proxy
          - https_proxy
          - no_proxy
      volumes:
        - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
        - ${NGINX_HOST_LOG_PATH}:/var/log/nginx
        - ${NGINX_SITES_PATH}:/etc/nginx/sites-available
        - ${NGINX_SSL_PATH}:/etc/nginx/ssl
      ports:
        - "${NGINX_HOST_HTTP_PORT}:80"
        - "${NGINX_HOST_HTTPS_PORT}:443"
      depends_on:
        - php-fpm
      networks:
        - frontend
        - backend
  
    ### Varnish ##########################################
    proxy:
      container_name: proxy
      build: ./varnish
      expose:
        - 80
      environment:
        - VARNISH_CONFIG="/etc/varnish/default.vcl"
        - CACHE_SIZE=128m
        - VARNISHD_PARAMS="-p default_ttl=3600 -p default_grace=3600"
        - VARNISH_PORT=80
        - BACKEND_HOST=workspace
        - BACKEND_PORT=8888
        - VARNISH_SERVER=SERVER1
      links:
        - workspace
      networks:
        - frontend
  
    ### Docker-in-Docker ################################################
    docker-in-docker:
      container_name: docker-in-docker
      image: docker:dind
      privileged: true
      volumes:
        - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
      expose:
        - 2375
      networks:
        - backend
  </code></pre>
  
  <p>Container is up and running:
  <a href="https://i.stack.imgur.com/YqWOS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YqWOS.png" alt="container log"></a>
  Docker ps output:
  <a href="https://i.stack.imgur.com/Ey6vp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ey6vp.png" alt="docker ps"></a></p>