Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (29.3k points)

When i am trying to remove the docker container and trying to build a docker job inside jenkins i got the below error. Any help would be helpful

image.png

Below are the commands that i am running in execute shell

image.png

Note: I am running the job for the first time, There is no previous build.

1 Answer

0 votes
by (50.2k points)

Reason: As you are trying for the first time, then there is no docker container to remove. 

If you are trying to remove using:

sudo docker rm -f $(sudo docker ps -a -q)

which will throw you the above error.

Solution: To resolve this query first run the build without rm command then from the second execution you can use the above command for removing the container and building when there is a push to git hub.

For more information, check out this Docker tutorial

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...