Skip to content

Instantly share code, notes, and snippets.

@eklect
Created April 10, 2019 19:52
Show Gist options
  • Select an option

  • Save eklect/ffae44f92d335e9747fde8069fea4ef9 to your computer and use it in GitHub Desktop.

Select an option

Save eklect/ffae44f92d335e9747fde8069fea4ef9 to your computer and use it in GitHub Desktop.
Docker -> Example Dev Box DockerFile
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y
RUN apt-get upgrade -y
RUN apt-get install -y apache2
RUN apt-get install -y php
RUN apt-get install -y php-dev
RUN apt-get install -y php-mysql
RUN apt-get install -y libapache2-mod-php
RUN apt-get install -y php-curl
RUN apt-get install -y php-json
RUN apt-get install -y php-common
RUN apt-get install -y php-mbstring
RUN apt-get install -y composer
RUN curl -s "https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh" | /bin/bash
RUN apt-get install -y software-properties-common
RUN apt-get install -y php 7.2-phalcon
COPY ./php.ini /etc/php/7.2/apache2/php.ini
COPY ./slc.conf /etc/apache2/sites-available/slc.conf
COPY ./apache2.conf /etc/apache2/apache2.conf
RUN rm -rfv /etc/apache2/sites-enabled/*.conf
RUN ln -s /etc/apache2/sites-available/slc.conf /etc/apache2/sites-enabled/slc.conf
CMD ["apachectl","-D","FOREGROUND"]
RUN a2enmod rewrite
EXPOSE 80
EXPOSE 443
@andymagill
Copy link

This file errors out on missing php.ini, slc.conf, and apache2.conf.

@eklect
Copy link
Author

eklect commented Mar 20, 2020

@andymagill,

This might be by using a different version of PHP. Which PHP version are you using ? if it's different, simply change the 7.2 to whatever version you are using.

@hariknine
Copy link

This file errors out on missing php.ini, slc.conf, and apache2.conf.
You need those files to copy to the container.

@khanzadimahdi
Copy link

too many RUN commands!!! each run generates a layer!

@eklect
Copy link
Author

eklect commented Jan 3, 2021

That's good to know. I never knew about the layers. I'll update this soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment