Docker 错误:下载deno导入时请求过多429

Docker 错误:下载deno导入时请求过多429,docker,deno,Docker,Deno,我将deno与dockerhayd/alpine denoimage一起使用,并监视文件更改。当我构建容器时,会收到429太多请求导入std依赖项: ... Download https://deno.land/std@0.54.0/encoding/_yaml/type/int.ts Download https://deno.land/std@0.54.0/encoding/_yaml/type/map.ts Download https://deno.land/std@0.54.0/

我将deno与docker
hayd/alpine deno
image一起使用,并监视文件更改。当我构建容器时,会收到
429太多请求
导入
std
依赖项:

...

Download https://deno.land/std@0.54.0/encoding/_yaml/type/int.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/map.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/merge.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/nil.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/omap.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/pairs.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/seq.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/set.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/str.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/timestamp.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/binary.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/bool.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/float.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/int.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/map.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/merge.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/nil.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/omap.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/pairs.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/seq.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/set.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/str.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/timestamp.ts

error: Import 'https://deno.land/std@0.54.0/encoding/_yaml/type/timestamp.ts' failed: 429 Too Many Requests
我的外部依赖项位于
deps.ts
中,它具有以下导入:

export { Application, Router } from 'https://deno.land/x/oak/mod.ts'
export { connect } from 'https://deno.land/x/redis/mod.ts'
除了denon导入之外,没有其他外部依赖项

我用来运行它的Dockerfile:

FROM hayd/alpine-deno:1.0.1

ENV DENO_DIR /cache

EXPOSE 4000

WORKDIR /app/

COPY . .

RUN deno install --allow-read --allow-run --allow-write -f --unstable https://deno.land/x/denon/denon.ts
RUN deno cache src/deps.ts

ENTRYPOINT ["/root/.deno/bin/denon"]

CMD ["run", "--allow-net", "src/mod.ts"]
许多文件似乎被多次下载(或尝试下载、失败和重试)。这种情况并不总是发生,但往往足以破坏构建自动化。有没有人有过类似的问题?缓存导入是否存在问题

缓存导入是否存在问题

不,缓存与此无关

看来,
deno.land
有利率限制,你正在超越这些限制。您可以直接使用github,这很可能会有更高的限制

供德农使用

https://raw.githubusercontent.com/denosaurs/denon/master/denon.ts

您还可以更改代码依赖项:

...

Download https://deno.land/std@0.54.0/encoding/_yaml/type/int.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/map.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/merge.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/nil.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/omap.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/pairs.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/seq.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/set.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/str.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/timestamp.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/binary.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/bool.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/float.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/int.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/map.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/merge.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/nil.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/omap.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/pairs.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/seq.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/set.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/str.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/timestamp.ts

error: Import 'https://deno.land/std@0.54.0/encoding/_yaml/type/timestamp.ts' failed: 429 Too Many Requests
更改<代码>https://deno.land/x/oak/mod.ts与
https://raw.githubusercontent.com/oakserver/oak/master/mod.ts

对于
redis
您应该使用
https://raw.githubusercontent.com/keroxp/deno-redis/master/mod.ts

只是一个URL重写服务器,所以最终,您实际上是从Github中提取的

deno.land/x是用于deno脚本的URL重写服务。基本的 代码URL的格式为 . 如果你漏掉了 分支,它通常默认为模块的默认分支 大师


您应该使用带标签的版本,而不是
master
,否则您的docker图像将不会始终具有相同的代码

对于
v4.0.0

export { Application, Router } from 'https://github.com/oakserver/oak/blob/v4.0.0/mod.ts'
export { connect } from 'https://raw.githubusercontent.com/keroxp/deno-redis/v0.10.1/mod.ts
缓存导入是否存在问题

不,缓存与此无关

看来,
deno.land
有利率限制,你正在超越这些限制。您可以直接使用github,这很可能会有更高的限制

供德农使用

https://raw.githubusercontent.com/denosaurs/denon/master/denon.ts

您还可以更改代码依赖项:

...

Download https://deno.land/std@0.54.0/encoding/_yaml/type/int.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/map.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/merge.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/nil.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/omap.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/pairs.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/seq.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/set.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/str.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/timestamp.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/binary.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/bool.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/float.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/int.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/map.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/merge.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/nil.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/omap.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/pairs.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/seq.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/set.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/str.ts

Download https://deno.land/std@0.54.0/encoding/_yaml/type/timestamp.ts

error: Import 'https://deno.land/std@0.54.0/encoding/_yaml/type/timestamp.ts' failed: 429 Too Many Requests
更改<代码>https://deno.land/x/oak/mod.ts与
https://raw.githubusercontent.com/oakserver/oak/master/mod.ts

对于
redis
您应该使用
https://raw.githubusercontent.com/keroxp/deno-redis/master/mod.ts

只是一个URL重写服务器,所以最终,您实际上是从Github中提取的

deno.land/x是用于deno脚本的URL重写服务。基本的 代码URL的格式为 . 如果你漏掉了 分支,它通常默认为模块的默认分支 大师


您应该使用带标签的版本,而不是
master
,否则您的docker图像将不会始终具有相同的代码

对于
v4.0.0

export { Application, Router } from 'https://github.com/oakserver/oak/blob/v4.0.0/mod.ts'
export { connect } from 'https://raw.githubusercontent.com/keroxp/deno-redis/v0.10.1/mod.ts

Deno软件包管理器,非常新。我查过了,Deno团队仍在进行优化

使用皮卡,更好的支持

或:

去包装样本:

import { opn } from 'https://denopkg.com/hashrock/deno-opn/opn.ts'

opn('https://denopkg.com')

Deno软件包管理器,非常新。我查过了,Deno团队仍在进行优化

使用皮卡,更好的支持

或:

去包装样本:

import { opn } from 'https://denopkg.com/hashrock/deno-opn/opn.ts'

opn('https://denopkg.com')

非常感谢。尽管一些依赖项仍然从deno.land导入,但更改我自己的导入似乎足以解决目前的节流问题。谢谢。尽管一些依赖项仍然从deno.land导入,但更改我自己的导入似乎足以解决目前的节流问题。