Hi folks, I got very slow on `meltano install` eve...
# infra-deployment
i
Hi folks, I got very slow on
meltano install
every time I use Dockerfile to build the image since it will install everything from scratch. Is there anyway I can use the cache with docker or the packages previous built? My Dockerfile:
Copy code
# <http://registry.gitlab.com/meltano/meltano:latest|registry.gitlab.com/meltano/meltano:latest> is also available in GitLab Registry
ARG MELTANO_IMAGE=meltano/meltano:latest
FROM $MELTANO_IMAGE

WORKDIR /project

# Install any additional requirements
COPY ./requirements.txt .
RUN pip install -r requirements.txt

# Copy over Meltano project directory
COPY . .
# RUN meltano install

# Don't allow changes to containerized project files
ENV MELTANO_PROJECT_READONLY 1

# Expose default port used by `meltano ui`
EXPOSE 5000

ENTRYPOINT ["meltano"]
e
Hi @Ian Hsu. You could probably benefit from https://docs.docker.com/reference/dockerfile/#run---mount. For example:
Copy code
RUN --mount=type=cache,target=/root/.cache meltano install
See also: • https://pip.pypa.io/en/stable/topics/caching/#pip-cache-dir
i
thanks! let me try it 🙂