Error saying Some index files failed to download Thet have been ignored or old ones used instead

0 votes

I'm trying to install ansible in my Jenkins using a docker image but I keep getting stuck with an error.

My Dockerfile:

FROM jenkins

USER root

RUN apt-get install -y software-properties-common
RUN apt-add-repository ppa:ansible/ansible
RUN apt-get update
RUN apt-get install -y ansible

USER jenkins

Error:

W: Failed to fetch <repository-url> 404 Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
Jan 13, 2019 in Jenkins by Lisha
2,305 views

The first two command in your Dockerfile is very specific to installing Ansible on Ubuntu. You don't seem to be using Ubuntu and hence the error. Either try using your base OS to Ubuntu or change your Dockerfile, something like this:

FROM jenkins
USER root
RUN apt-get update
RUN apt-get install -y ansible
USER jenkins
Is it because of the blankline in the Dockerfile? Can we have them in our dockerfile?
No Vardhan, It's not because of the Dockerfile. Dockerfiles are allowed to have blank spaces, they are just ignored during execution. I don't think @Laya is trying to install ansible on Ubuntu but her Dockerfile sure does contain commands which are specific to the base OS Ubuntu. It has nothing to do with blank lines in Dockerfile.

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Jenkins

0 votes
1 answer
0 votes
1 answer
0 votes
2 answers

Error Jenkins: Failed to connect to repository

Jenkins runs as another user, not as ...READ MORE

answered Aug 7, 2019 in Jenkins by Sirajul
• 59,190 points
11,828 views
0 votes
5 answers

How to resolve this error “Jenkins Host key verification failed”?

HI Mam, Please check the following solution:: 1. Switch ...READ MORE

answered May 3, 2019 in Jenkins by anonymous
65,720 views
0 votes
1 answer

Error saying "localhost:3001error" When trying to run a build - Jenkins

There are two possible issues with this ...READ MORE

answered Dec 19, 2018 in Jenkins by Kalgi
• 52,340 points
2,341 views
+2 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
7,702 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP