up vote 1 down vote favorite My docker compose file is: version: '3' services: postgres: container_name: crm-psql image: postgres:9.3 restart: always environment: - POSTGRES_DB=crm - POSTGRES_USER=root - POSTGRES_PASSWORD=root volumes: - ./db/postgres/data:/var/lib/postgresql/data ports: - 5432:5432 nginx: container_name: crm-nginx image: nginx:1.15 restart: always ports: - 80:80 - 443:443 volumes: - ./nginx/conf.d:/etc/nginx/conf.d web: build: . ports: - 9000:9000 volumes: - .:/src/main/java - ~/.ivy2:/root/.ivy2 - ~/.sbt:/root/.sbt links: - postgres - nginx The docker file for build is: FROM openjdk:8 ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin ENV SBT_VERSION 1.2.1 # Install curl RUN apt-get update && apt-get -y install curl && apt-get -y install vim # Install sbt RUN curl -L -o sbt-$SBT_VERSION.deb https://dl.bintray.com/sbt/...