


To run this container in detached mode, the command would be:ĭocker run -name docker-nginx -p 8080:80 -d nginx You might want to run that container in detached mode (otherwise you won’t get your command prompt returned without killing the container. Pointing a browser on your network to the IP address of the host machine, at port 8080, will display the NGINX splash page.

The command for this would be:ĭocker run -name docker-nginx -p 8080:80 nginx Let’s expose port 80 on the container to port 8080 on the host. Should that be the case, you’ll have to expose a different external port to port 80 on the container. Say you already have port 80 used on the machine hosting Docker (possibly for Apache or another server). You can now point a browser on your network to the IP address of the server hosting the NGINX Docker container to reveal the NGINX splash page. nginx – this tells Docker which image to use for the container.-p 80:80 this informs Docker how we want to expose the port (in the form of network port:container port).–name – this tells Docker what we want to name our container.run – this instructs docker we are running an image as a container.To do this, we run the image with the command:ĭocker run -name docker-nginx -p 80:80 nginx Now we have to run the NGINX image such that it will expose the Docker container port to the network port. Now you can run Docker without having to use sudo. Note: If you have not added your standard user to the Docker group, do so with the following command:Īfter that command executes, logout and log back in. We are going to pull the official NGINX image with the command:
#Docker run image id returns nothing software
Networking: Must-read coverageīest network monitoring software and tools 2022ĥ programming languages network architects should learn (free PDF)īehind the scenes: A day in the life of a database administratorģ essential productivity-boosting resources for network admins (TechRepublic Premium)
#Docker run image id returns nothing how to
The process isn’t all that difficult, you just have to know how to work the right command-fu to make it happen. What is slightly challenging, however, is making that container available to your local network (something important when working with a server). Running a Docker container isn’t challenging. I will demonstrate on Ubuntu 16.04 and will assume you already have docker installed and ready to go. By installing the likes of NGINX as a Docker container, you can simply replace the image when new updates arrive.īut how do you deploy NGINX as a Docker container? Let me walk you through the process. With these apps as containers, it becomes possible to cut down on sysadmin overhead, thanks to no longer having to manage applications through package managers or installing from source. With this, you can extend the offerings of your business or quickly test a new server or service. Using Docker containers makes for an incredibly easy way to roll out apps and services onto your network. If you're looking to run NGINX as a Docker container, and expose it to your local network, here's how to do it.
