فهرست منبع

site dockerfile

kora 1 سال پیش
والد
کامیت
dd83b3f03e
2فایلهای تغییر یافته به همراه7 افزوده شده و 4 حذف شده
  1. 4 3
      server_readme.md
  2. 3 1
      site2/Dockerfile

+ 4 - 3
server_readme.md

@@ -29,9 +29,10 @@ PYTHON:
 
 
 DOCKER:
-- docker exec -it tigro bash  -->  explore filesystem Docker of *container* named 'tigro' (with bash); more generally, docker exec will execute commands on it. The container has to be running.
-- docker run -d --name tigro -p 80:80 tigro000  -->  example of running Docker: run image 'tigro000' in container named 'tigro'; expose internal port 80 on external port 80 (-p); detach (-d)
+- docker exec -it CONTAINER bash  -->  explore filesystem Docker of specified *container* (with bash); more generally, 'docker exec' will execute commands on it. The container has to be running.
+- docker run -d --name CONTAINER -p 80:80 IMAGE  -->  example of running Docker: run specified *image* in *container* named 'CONTAINER'; expose internal port 80 on external port 80 (-p); detach (-d)
 - docker images  -->  check existing Docker images
 - docker ps [-a]  -->  check running [all] docker containers
 - docker rm CONTAINER  -->  delete specified container
-- docker image rm IMAGE  -->  delete specified image
+- docker image rm IMAGE  -->  delete specified image
+- docker container logs CONTAINER  -->  check container logs

+ 3 - 1
site2/Dockerfile

@@ -3,4 +3,6 @@ COPY . /usr/local/apache2/htdocs/
 COPY js/toExport_alt.js /usr/local/apache2/htdocs/js/toExport.js
 COPY deploy/httpd.conf /usr/local/apache2/conf/
 
-EXPOSE 80
+EXPOSE 80
+
+CMD ["httpd", "-D", "FOREGROUND"]