Hi Team…
I am confused with a docker issue for the past three days… Some one please help. The below is the docker file
# Top level build args
ARG build_for=linux/amd64
##
# base image (abstract)
##
FROM --platform=$build_for python:3.10.7-slim-bullseye as base
COPY . /portal2_data_migration
# Update and install system packages
RUN apt-get update -y && \
apt-get install --no-install-recommends -y -q \
git libpq-dev python-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install dbt
RUN pip install -U pip
RUN pip install -r portal2_data_migration/dbt-requirements.txt
RUN pip install --force-reinstall MarkupSafe==2.0.1
# Install dbt dependencies
WORKDIR /portal2_data_migration
RUN dbt deps
# Specify profiles directory
ENV DBT_PROFILES_DIR=$(pwd)
# Expose port for dbt docsls
EXPOSE 8080
# Set the entrypoint to dbt
ENTRYPOINT ["dbt"]
# Set the default command to run when the container starts
CMD ["run"]
For the above project, I have my projects.yml in the same level as my dbt_project.yml . My docker image is generated
But when i do docker run, the below is my error
docker run -it dbt-with-docker
Encountered an error while reading the project: ERROR: Runtime Error
Could not find profile named 'portal2_data_migration'
Encountered an error:
Runtime Error
Could not run dbt