gpt4 book ai didi

docker - 在任何来源中都找不到ast-2.3.0

转载 作者:行者123 更新时间:2023-12-02 18:29:52 25 4
gpt4 key购买 nike

不推荐使用Dockerfile。
在这里,我正在安装bundle install,并在其中安装了bundle的地方创建一个新目录/ bundle。在将此图像作为容器运行时,我正在将当前目录挂载到/ code(即WORKDIR)上,以便在那里所有rakefiles,Gemfile,GEMFile.lock都可用。但是,每次我尝试启动容器时,ENTRYPOINT命令“bundle exec rake语法”都会失败。
enter image description here

FROM puppet/puppet-agent-alpine
RUN mkdir /code && \
mkdir /bundle

WORKDIR /code

RUN apk update && apk add git

COPY Gemfile Gemfile.lock /code/

RUN gem install --no-ri --no-rdoc bundler && \
bundle install --without linters --path /bundle && \
gem cleanup



ENTRYPOINT ["bundle", "exec","rake", "syntax"]

COPY docker/syntax/Dockerfile /Dockerfile
我尝试删除Gemfile.lock时没有运气。
当我在运行时覆盖入口点时,我可以登录到容器并手动运行入口点命令,该命令是bundle exec rake语法。
它仍然给我同样的错误。
我将路径添加到/ bundle。
但是,如果我在登录到容器后再次手动执行 bundle 安装,此命令将成功运行。
任何帮助,将不胜感激!

最佳答案

尝试:

$ docker-compose build

图像会过时,并且不会自动重建。

关于docker - 在任何来源中都找不到ast-2.3.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50823367/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com