Docker Community Forums

Share and learn in the Docker community.

First Dockerfile for a lamp stack around fedora, advices needed


(Dranka) #1

Hello,

I’m kinda new to docker, and I want to build my own docker lamp-stack arround fedora and not ubuntu.
I’ve made my first Dockerfile which seems to work excepted few errors arround php.
I’m really willing to use fedora environnement, first i’m more use to it and secondly it’s way better than ubuntu.
Here is my Dockerfile

FROM fedora:27

# Propriétaire du container
MAINTAINER nzhiti@gmail.com

# Création du container avec mise à jour du système
RUN dnf upgrade -y

# Installation de apache/php 7.1.22
RUN dnf install -y httpd php php-common

# Installation des modules php
RUN dnf install -y php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongodb php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php php-pecl-zip

# Installation de supervisor
RUN dnf install -y supervisor

# Ajout du fichier de configuration supervisor
ADD supervisord.conf /etc/supervisord.conf

# On nettoie le cache dnf 
RUN dnf clean packages

# Port 
EXPOSE 80

# On lance servisor
CMD ["/usr/bin/supervisord"]

Sorry comments are in french.

During installation I’ve a problem with this

About my docker file, am I getting close to the right things or completly wrong ?

Thanks a lot for your advices.