Fedora Server Docker

To illustrate, in this article we will explain how to install Docker on CentOS 7 and Ubuntu 16.04, and spin up an Apache 2.4 container from Docker Hub. We will then use it to serve a simple web page from our home directory – all without the need to install a web server on our host. The Fedora package of Cockpit has a built-in Docker integration which makes Docker container management over multiple servers quite easy. Cockpit is available out of the box with Docker integration in Fedora Server, CentOS Atomic, Fedora Atomic, Red Hat Enterprise 7.1+ extras repo, and Arch Linux User repo.

Docker containers is a great concept to connect world of different distributions together. It is ideal tool to work with CentOS on Fedora, with Fedora on Red Hat Enterprise Linux or vise versa. That is the reason why we do not need to restrict our use cases on Fedora-based Docker containers only when we work on Fedora host machine, but we can use Docker containers based on CentOS or even Red Hat Enterprise Linux.

It is necessary to realize that when working with Docker containers, content of the image matters and is very important to trust it. Container itself is protected by cgroups and SELinux, but it still shares the kernel, so malicious container may theoretically harm the host system as well. See more information about security at Docker Security and Project Atomic article. Long story short, you should never run random image container on your production host.

Fedora images

You can find all the official Docker images provided by Fedora community in the official Fedora repository on Docker Hub.

Docker images in fedora/ namespace feature fedora:latest tag for rawhide and fedora:23 tag for Fedora 23.

To get Fedora 23 base image, run:

There are also a lot of application Docker images built as layered images on top of Fedora base image. It’s sources live in Fedora Dockerfiles repository and are available under fedora/ namespace on the Docker Hub.

For example, to pull and run the MariaDB Docker container, run:

The list of available Fedora Docker images is

CentOS images

You can find find all the official Docker images provided by CentOS community in the official CentOS repository and the base Docker image in the official library on Docker Hub.

To get CentOS 7 base image, run:

To get CentOS 6 base image, run:

There is always centos:latest tag for the latest released version.

Software Collections based images

DockerFedora server setup

The official CentOS repository contains Docker images that are similar to the images provided by Red Hat under rhscl/ namespace.

Fedora Server Docker 2020

These Docker images are based on Software Collections. Some of them (older versions) are released under the OpenShift organization, the newer versions are available under CentOS organization. Some of them are enabled for Source-To-Image.

To download them just run docker pull IMAGE_NAME.

Fedora Server Setup

Image NameDescription
centos/httpd-24-centos7Apache HTTP 2.4 Server
centos/mariadb-100-centos7MariaDB 10.0 SQL database server
centos/mongodb-26-centos7MongoDB 2.6 NoSQL database server
centos/mysql-56-centos7MySQL 5.6 SQL database server
centos/postgresql-94-centos7PostgreSQL 9.4 SQL database server
centos/nginx-16-centos7Nginx 1.6 server and a reverse proxy server
centos/nodejs-010-centos7NodeJS 0.10 platform for building and running applications
centos/passenger-40-centos7Phusion Passenger® 4.0 web server and application server
centos/perl-520-centos7Perl 5.20 platform for building and running applications
centos/php-56-centos7PHP 5.6 platform for building and running applications
centos/python-27-centos7Python 2.7 platform for building and running applications
centos/python-34-centos7Python 3.4 platform for building and running applications
centos/ror-41-centos7Platform for building and running Ruby on Rails 4.1 applications
centos/ruby-22-centos7Ruby 2.2 platform for building and running applications
openshift/mysql-55-centos7MySQL 5.5 SQL database server
openshift/postgresql-92-centos7PostgreSQL 9.4 SQL database server
openshift/mongodb-24-centos7MongoDB 2.4 NoSQL database server
openshift/ruby-20-centos7Ruby 2.0 platform for building and running applications
openshift/python-33-centos7Python 3.3 platform for building and running applications
openshift/nodejs-010-centos7NodeJS 0.10 platform for building and running applications
openshift/perl-516-centos7Perl 5.16 platform for building and running applications

Docker On Fedora Server 32

Authors: Adam Samalik, Budh Ram Gurung, Honza Horak, Jiri Popelka, Josef Stribny