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
63 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
1 answer

Error Jenkins: Failed to connect to repository

This happens when you create the ssh ...READ MORE

answered Jul 6, 2018 in Jenkins by Sophie may
• 9,050 points
295 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
2,095 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
• 35,800 points
68 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,120 points
60 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.