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 http://ppa.launchpad.net/ansible/ansible/ubuntu/dists/jessie/main/binary-amd64/Packages 404 Not Found

E: Some index files failed to download. Thet have been ignored, or old ones used instead.
Jan 13, 2019 in Jenkins by Lisha
1,463 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,230 points
10,531 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
61,756 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,360 points
1,344 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,100 points
2,655 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