Browse Source

Added dockerfile and nginx.conf; modified jenkinsfile

xiaoct 7 years ago
parent
commit
a130266df8
3 changed files with 32 additions and 3 deletions
  1. 16 0
      Dockerfile
  2. 3 3
      Jenkinsfile
  3. 13 0
      nginx.conf

+ 16 - 0
Dockerfile

@@ -0,0 +1,16 @@
+######################
+## Dockerfile to build container images consisting of Node.js and nginx environment
+# Based on Ubuntu
+#####
+
+# Set the base image to Ubuntu
+FROM Ubuntu
+# File Author / Maintainer
+# MAINTAINER name Chunteng Xiao
+
+RUN apt-get update
+RUN apt-get install nodejs nginx
+RUN rm -v /etc/nginx/nginx.conf
+ADD nginx.conf /etc/nginx
+EXPOSE 80
+CMD service nginx start

+ 3 - 3
Jenkinsfile

@@ -1,8 +1,8 @@
 pipeline {
     agent {
-        docker {
-            image 'node'
-            args '-p 80:80 --registry-mirror=https://registry.docker-cn.com daemon'
+        dockerfile {
+            filename 'Dockerfile'
+            additionalBuildArgs '-p 80:80 --registry-mirror=https://registry.docker-cn.com daemon'
         }
     }
     stages {

+ 13 - 0
nginx.conf

@@ -0,0 +1,13 @@
+worker_processes 1;
+event { worker_connections 1024 };
+http {
+server {
+	listen 80;
+	server_name 192.168.253.189;
+	access_log /var/log/nginx/fuck.log;
+	root ;
+	index index.html index.htm;
+	location / {
+	}
+}
+}