Last active
January 4, 2019 16:05
-
-
Save georgerussellpruitt/87441e6da4cfc8de8d10173514552979 to your computer and use it in GitHub Desktop.
docker ubuntu/nginx base
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
# Install Nginx. | |
RUN \ | |
apt-get update && \ | |
apt upgrade -y && \ | |
apt-get install -y nginx php7.2-fpm php7.2-mysql && \ | |
rm -rf /var/lib/apt/lists/* && \ | |
echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \ | |
chown -R www-data:www-data /var/lib/nginx | |
# Define mountable directories. | |
VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx", "/var/www/html"] | |
# copy existing app code | |
RUN mkdir /app | |
RUN mkdir /nginx-conf | |
RUN mkdir /var/www/html/WordPress | |
COPY ./prime-stack/WordPress /var/www/html/WordPress | |
RUN mkdir /var/www/html/WordPress/wp-content/themes/prime-themes | |
COPY ./prime-stack/prime-theme /var/www/html/WordPress/wp-content/themes/prime-theme | |
COPY ./prime-stack/prime-plugins/ /var/www/html/WordPress/wp-content/plugins | |
# not yet implemented | |
#COPY /home/ubuntu/prime-nginx/ /nginx-conf | |
RUN ls -la /var/www/html/WordPress | |
RUN ls -la /var/www/html/WordPress/wp-content/plugins | |
RUN ls -la /var/www/html/WordPress/wp-content/themes | |
# Define working directory. | |
WORKDIR /etc/nginx | |
# Define default command. | |
CMD ["nginx"] | |
# Expose ports | |
EXPOSE 80 | |
EXPOSE 443 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment