Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase TCP timeouts #228

Open
vporton opened this issue Jun 4, 2024 · 2 comments
Open

Increase TCP timeouts #228

vporton opened this issue Jun 4, 2024 · 2 comments

Comments

@vporton
Copy link

vporton commented Jun 4, 2024

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
Copy link
Author

vporton commented Jun 4, 2024

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

@ZenVoich
Copy link
Owner

ZenVoich commented Jun 5, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants