Could not find ast-2.3.0 in any of the sources

266 Views Asked by At

The Dockerfile is deprecated. Here I am installing bundle install and create a new directory /bundle where the bundle is installed. While running this image as a container, I am mounting the current directory to /code which is the WORKDIR so that all the rakefiles, Gemfile, GEMFile.lock are all available there. But the ENTRYPOINT command "bundle exec rake syntax" fails everytime I try to start the container. 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

I tried deleting the Gemfile.lock with no luck. When I override the entrypoint in runtime, I can login to the container and manually run the entry point command which is bundle exec rake syntax. It still gives me the same error. I added path to /bundle. But this command runs successfully if I manually do bundle install once again after logging into the container.

Any help would be appreciated!

1

There are 1 best solutions below

0
On

Try:

$ docker-compose build

Images get stale and don't rebuild automatically.