mops icon indicating copy to clipboard operation
mops copied to clipboard

Increase TCP timeouts

Open vporton opened this issue 1 year ago • 2 comments

There should be a way (config file, command line flags) to increase TCP timeouts when downloading packages.

I regularly need to restart my downloading in Docker of dependencies of my software from the beginning. That is, I run docker several times instead of one.

vporton avatar Jun 04 '24 18:06 vporton

Alternatively, you can restart download on timeouts (up to a certain number of times per package).

vporton avatar Jun 04 '24 18:06 vporton

I regularly need to restart my downloading in Docker of dependencies of my software from the beginning. That is, I run docker several times instead of one.

If you rebuild docker image on file changes, you can avoid re-downloading packages in Docker using docker build cache https://docs.docker.com/build/cache/ (also check out multi-stage builds https://docs.docker.com/build/building/multi-stage/)

  1. Add .mops folder to .dockerignore file

  2. Example Dockerfile

FROM node:22.2.0
WORKDIR /app
RUN curl -fsSL cli.mops.one/install.sh | sh
COPY mops.toml ./
RUN mops install
COPY . .

If you change mops.toml, packages will be downloaded on docker build.

Changing other files will not trigger downloading packages.

ZenVoich avatar Jun 05 '24 08:06 ZenVoich