【发布时间】:2020-09-27 08:59:15
【问题描述】:
我将 deno 与 docker hayd/alpine-deno 图像和 denon 一起使用,以监视文件更改。当我构建容器时,我得到 429 Too Many Requests 导入 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"]
许多文件似乎被多次下载(或尝试下载、失败并重试)。这并不总是发生,但经常足以破坏构建自动化。有没有人有类似的问题?缓存导入是否有问题?
【问题讨论】: