Install Nginx Docker Centos 7


Sudo yum install epel-release. Install Nginx on CentOS 7. Now that the EPEL repository is installed on your server, you can continue and install Nginx, using the following command: sudo yum install nginx. Enable Nginx to start when your server boots. Set up Nginx to start automatically at a server boot.

CentOS based image. Nginx not starting. I have a Cent OS based image that I built via Dockerfile. In it I RUN yum install nginx, COPY the nginx conf file into the image and RUN nginx (as a daemon), all of this as root. Then I switch the user to a normal one. No errors visible in the build log. But when I go in the container and run a simple. Nginx engine x is an HTTP and reverse proxy server. It is free and open source high-performance web server. Today we will install the latest version of Nginx on CentOS server. Nginx pronounced 'engine x' is a free, open-source, high-performance HTTP and reverse proxy server responsible for handling the load of some of the largest sites on the Internet. This tutorial will teach you how to install and manage Nginx on your CentOS 7 machine. Nginx docker image based on centos official image, versions 6 and 7. docker-nginx-centos/Dockerfile at master chentex/docker-nginx-centos.

Table of Contents


Nginx is a popular light-weight and high performance web server and commonly used as a proxy. It is quite flexible and a good alternative to Apache.


  • CentOS 7 or Red Hat Enterprise Linux 7
  • Local Linux and ProfitBricks firewall ports need to be opened for external requests
Install nginx docker centos 7 install

Install Nginx

Many distributions include Nginx as part of the default distribution repository. However, this version can become outdated and it is recommended installing from a repository containing the latest version.

Install Nginx Docker Centos 7

One common repository added to CentOS and Red Hat Enterprise Linux (RHEL) servers is the Extra Packages for Enterprise Linux (EPEL). The following command will add the EPEL repository to CentOS 7 or RHEL 7.

Optionally, the Nginx project also maintains a repository containing the latest Nginx build. To add the Nginx repository to CentOS 7 and RHEL 7.

Note: The above mentioned repositories are also available for 32-bit (i386/i686) versions of Nginx. However, it is highly recommend 64-bit versions be used for production server deployments.

Nginx can now be installed using yum.

Install Nginx Docker Centos 7

Install Nginx Docker Centos 7 Install


Install Nginx Docker Centos 7 Free


Start Nginx

Once Nginx has been installed, the service should be set to start on system boot.

Docker Centos Image

Now Nginx is ready to start.

You can verify the process has been started using curl to perform an HTTP request.

Install Nginx Docker Centos 7 32-bit

CentOS 7 has a local firewall enabled by default. Proper TCP ports may need to be opened to allow external requests. This will usually be port 80 for normal HTTP traffic.

Install Nginx Docker Centos 7 64-bit

Ports will also need to be opened when using the ProfitBricks firewall.

  • Most Viewed News

    • Get Docker Image
    • Setup Traefik
    • Get Docker Mac