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 in Jenkins by Lisha
92 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 in Jenkins by Sirajul
• 25,700 points
584 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 in Jenkins by anonymous
5,234 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
• 40,460 points
108 views
0 votes
1 answer
0 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
• 56,520 points
156 views