diff --git a/Dockerfile b/Dockerfile index 35a8ffb..73505de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,18 @@ FROM basessh MAINTAINER Dave P -# Create user +# Create nexus user RUN useradd --create-home nexus ; \ echo "nexus:nexus" | chpasswd -COPY start /start -RUN chmod +x /start +# Install nginx +RUN apt-get install -y nginx-light + +# Configure nginx +RUN echo "daemon off;" >> /etc/nginx/nginx.conf + +COPY nginx.conf /etc/supervisor/conf.d/nginx.conf +COPY default /etc/nginx/sites-available/default + +EXPOSE 80 diff --git a/default b/default new file mode 100644 index 0000000..832b86c --- /dev/null +++ b/default @@ -0,0 +1,17 @@ +server { + listen 80 default_server; + #listen [::]:80 default_server ipv6only=on; + + root /nexus/; + + index index.html index.htm; + server_name localhost; + + #auth_basic "Restricted"; + #auth_basic_user_file /etc/nginx/htpasswd; + + location / { + autoindex on; + try_files $uri $uri/ =404; + } +} diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..f23de88 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,3 @@ +[program:nginx] +command=/usr/sbin/nginx +autorestart=true