Ian Hsu
09/10/2024, 8:41 AMmeltano 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:
# <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"]
Edgar Ramírez (Arch.dev)
09/10/2024, 4:54 PMRUN --mount=type=cache,target=/root/.cache meltano install
See also:
• https://pip.pypa.io/en/stable/topics/caching/#pip-cache-dirIan Hsu
09/11/2024, 2:21 AM