瀏覽代碼

Improve setup documentation for Linux #151

Mark Shust 6 年之前
父節點
當前提交
12d661abdc
共有 3 個文件被更改,包括 10 次插入5 次删除
  1. 5 1
      README.md
  2. 3 2
      images/nginx/1.13/Dockerfile
  3. 2 2
      images/php/7.2/Dockerfile

+ 5 - 1
README.md

@@ -72,7 +72,7 @@ Folders:
 
 ## Prerequisites
 
-This setup assumes you are running Docker on a computer with at least 4GB of allocated RAM, a dual-core, and an SSD hard drive. [Download & Install Docker Community Edition](https://www.docker.com/community-edition#/download).
+This setup assumes you are running Docker on a computer with at least 4GB of allocated RAM, a dual-core, and an SSD hard drive. [Download & Install Docker Desktop](https://www.docker.com/products/docker-desktop).
 
 This configuration has been tested on Mac & Linux.
 
@@ -281,6 +281,10 @@ Otherwise, this project now automatically sets up Xdebug support with VS Code. I
 
 8. Open up `src/pub/index.php`, and set a breakpoint near the end of the file. Go to `Run > Debug 'magento2.test'`, and open up a web browser. Ensure the Chrome Xdebug helper is enabled by clicking on it > Debug. Navigate to your Magento store URL, and Xdebug within PHPStorm should now trigger the debugger and pause at the toggled breakpoint.
 
+### Linux
+
+Running Docker on Linux should be pretty straight-forward. Note that you need to run some [post install commands](https://docs.docker.com/install/linux/linux-postinstall/) as well as [installing Docker Compose](https://docs.docker.com/compose/install/). These steps are taken care of automatically with Docker Desktop, but not on Linux.
+
 ## Credits
 
 ### Mark Shust

+ 3 - 2
images/nginx/1.13/Dockerfile

@@ -10,11 +10,12 @@ RUN apt-get update && apt-get install -y openssl
 RUN mkdir /etc/nginx/certs \
   && echo -e "\n\n\n\n\n\n\n" | openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/certs/nginx.key -out /etc/nginx/certs/nginx.crt
 
-RUN chown -R app:app /etc/nginx/certs /sock /var/cache/nginx/ /var/run/nginx.pid /sock
-
 COPY ./conf/nginx.conf /etc/nginx/
 COPY ./conf/default.conf /etc/nginx/conf.d/
 
+RUN mkdir -p /etc/nginx/html /var/www/html \
+  && chown -R app:app /etc/nginx /var/www /var/cache/nginx /var/run/nginx.pid /sock
+
 EXPOSE 8443
 
 USER app:app

+ 2 - 2
images/php/7.2/Dockerfile

@@ -61,8 +61,8 @@ COPY conf/php.ini /usr/local/etc/php/
 COPY conf/php-fpm.conf /usr/local/etc/
 COPY bin/cronstart /usr/local/bin/
 
-RUN mkdir /sock
-RUN chown -R app:app /usr/local/etc/php/conf.d /sock
+RUN mkdir -p /etc/nginx/html /var/www/html /sock
+RUN chown -R app:app /etc/nginx /var/www /usr/local/etc/php/conf.d /sock
 
 USER app:app