Skip to content

Instantly share code, notes, and snippets.

@spicydog
Created September 24, 2016 14:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save spicydog/99c3e8227394fae0b756f29dbf9da129 to your computer and use it in GitHub Desktop.
Save spicydog/99c3e8227394fae0b756f29dbf9da129 to your computer and use it in GitHub Desktop.
docker ubuntu nginx php7.0 mariadb
FROM ubuntu:latest
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -y vim curl wget
RUN apt-get install -y software-properties-common language-pack-en-base
RUN LC_ALL=en_US.UTF-8 add-apt-repository -y ppa:ondrej/php
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
RUN add-apt-repository -y 'deb [arch=amd64,i386,ppc64el] http://mirrors.bestthaihost.com/mariadb/repo/10.1/ubuntu xenial main'
RUN apt-get update
RUN apt-get install -y nginx
RUN apt-get install -y php7.0-fpm php7.0-mysql php7.0-mbstring
RUN echo mysql-server mysql-server/root_password password password | debconf-set-selections
RUN echo mysql-server mysql-server/root_password_again password password | debconf-set-selections
RUN apt-get install -y mariadb-server
EXPOSE 80
RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
CMD service mysql start && service php7.0-fpm start && nginx -g "daemon off;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment