When building Dockerfile from an older version of ruby I’m getting a docker-cache error, see my Dockerfile to reproduce this error.
FROM ruby:1.9.3-p551
# Create app directory
RUN mkdir -p /app
WORKDIR /app
ENV RAILS_ENV=production
COPY . /app/
COPY Gemfile /app/
COPY Gemfile.lock /app/
RUN sed -i '/jessie-updates/d' /etc/apt/sources.list
# Install dependencies
RUN apt-get update && apt-get install -qq -y build-essential nodejs npm && apt-get install -qq -y zip
RUN bundle install
RUN mkdir -p log
RUN touch $RAILS_ENV.log
RUN cp /usr/share/zoneinfo/America/Toronto /etc/localtime
#RUN bundle exec sidekiq -d -e $RAILS_ENV -C config/sidekiq.yml -L log/$RAILS_ENV.log
ENTRYPOINT ["bundle", "exec"]
EXPOSE 3000
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @manpreetnarang, if you are seeing this error in your App Platform builds, it is because the ruby:1.9.3-p551 image uses a deprecated v1 Docker image manifest, which is not supported by App Platform.
As a workaround you can pull the image locally and push it to your own account, which will upgrade the manifest to v2, and then update the Dockerfile FROM to use your own version of the image:
docker pull ruby:1.9.3-p551
docker tag ruby:1.9.3-p551 your-dockerhub-username/ruby:1.9.3-p551
docker push your-dockerhub-username/ruby:1.9.3-p551
Let me know if that works!
Reference: https://docs.docker.com/registry/spec/deprecated-schema-v1/
Hi there @manpreetnarang,
What is the exact docker build command that you are using? Also can you share the exact error that you are getting?
One thing that I could suggest is making sure that you have the base image in place with the docker images command.
As far as I can see it is still present on Dockerhub:
https://hub.docker.com/_/ruby?tab=tags&page=1&ordering=last_updated&name=1.9.3-p551
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.