BretFisher / udemy-docker-mastery

Docker Mastery Udemy course to build, compose, deploy, and manage containers from local development to high-availability in the cloud
https://www.bretfisher.com/courses
MIT License
5.34k stars 6.21k forks source link

NGINX no longer contains ping #129

Open BretFisher opened 1 year ago

BretFisher commented 1 year ago

A change in the official nginx image https://hub.docker.com/_/nginx (nginx or nginx:latest ) removes ping, but I use it in the next few videos to test connectivity, so you might get an error about "ping not found". I'm working on updates to those videos but until I can get them processed and uploaded, just do this:

Anywhere I do a docker container run nginx , where nginx is the image you should use, replace that with nginx:alpine, which still has ping command in it.

There are other ways to solve this, including adding the ping util with apt-get, making your own image, etc. More info in this Q&A answer.

Original Q&A