DBT Project level documentation not loading when running DBT Project in a docker container

Hi everyone :wave:

I’m running a dbt project inside a docker container. Everything works fine. But the project-level documentation is not able to load.

Here’s my Dockerfile to build the image:

FROM python:3.9

RUN apt-get update \
    && apt-get install -y --no-install-recommends

WORKDIR app
COPY . .

RUN pip install --upgrade pip
RUN pip install -r requirements.txt --no-cache-dir
RUN dbt deps

EXPOSE 8080
ENTRYPOINT dbt build --profiles-dir profiles && \
           dbt docs generate --profiles-dir profiles && \
           dbt docs serve --profiles-dir profiles

And here’s the docker-compose file:

version: "3.7"

services:
  db:
    image: postgres:13
    restart: on-failure
    container_name: dvdrental-postgres
    environment:
      POSTGRES_USER: "postgres"
      POSTGRES_PASSWORD: "postgres"
      POSTGRES_DB: "tempdb"
    volumes:
      - ./data/dvdrental:/docker-entrypoint-initdb.d
    ports:
      - "5432:5432"
    networks:
      - dvdrental-network

  dbt-workload:
    container_name: dbt-dvdrental
    restart: on-failure
    build: .
    image: dbt-dvdrental-image
    ports:
      - "8080:8080"
    depends_on:
      - db
    networks:
      - dvdrental-network

networks:
  dvdrental-network:
    driver: bridge

All the dbt tests and transformations are applied to the data successfully and docs are generated as well. Only the project overview is loading. All other docs related to models is loading correctly.

Is there anything I’m missing?

Not sure why, but I replaced ENTRYPOINT with CMD in the Dockerfile and now the Documentation is loaded successfully.