【问题标题】:Docker build: meteor not foundDocker构建:未找到流星
【发布时间】:2021-12-12 22:30:30
【问题描述】:

我可以在我的本地机器上设置流星。必须使用 Docker 映像将其推送到 EC2 容器。在执行构建步骤时,构建过程抛出错误流星未找到。

Dockerfile:

FROM node:14.3
RUN curl https://install.meteor.com/ | sh
COPY . /usr/src/app 
WORKDIR /usr/src/app
RUN chmod -R 700 /usr/src/app/.meteor/local
RUN meteor run install 
RUN meteor build --server-only --directory build

终端命令:

docker build -t meteor-test .

错误截图:

【问题讨论】:

  • 倒数第三行的/home/gitpod 目录是什么?另请注意 RUN export ... 是无操作的;您需要使用ENV 来设置环境变量。我通常希望docker build 编写文本输出;你能用你运行的命令及其输出的文本替换屏幕截图吗?
  • 我已经修改了帖子,请立即查看

标签: docker meteor


【解决方案1】:

由于 curl 时出现证书错误,meteor 未安装在您的 docker 容器中。

固定的 Dockerfile

FROM node:14.3
RUN curl https://install.meteor.com/ -k | sh
COPY . /usr/src/app 
WORKDIR /usr/src/app
RUN chmod -R 700 /usr/src/app/.meteor/local
RUN meteor run install 
RUN meteor build --server-only --directory build

-k 表示不安全,这基本上意味着它在进行 curl 时不会检查 ssl 证书。如果您觉得该网站不值得信任,请不要使用 -k 标志进行 curl。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-05-29
    • 2015-05-20
    • 1970-01-01
    • 1970-01-01
    • 2017-01-27
    • 2016-08-07
    • 2014-06-30
    • 1970-01-01
    相关资源
    最近更新 更多