Add nginx
This commit is contained in:
parent
dad2258164
commit
d0dfee2531
14
Dockerfile
14
Dockerfile
|
@ -1,10 +1,18 @@
|
||||||
FROM basessh
|
FROM basessh
|
||||||
MAINTAINER Dave P
|
MAINTAINER Dave P
|
||||||
|
|
||||||
# Create user
|
# Create nexus user
|
||||||
RUN useradd --create-home nexus ; \
|
RUN useradd --create-home nexus ; \
|
||||||
echo "nexus:nexus" | chpasswd
|
echo "nexus:nexus" | chpasswd
|
||||||
|
|
||||||
COPY start /start
|
# Install nginx
|
||||||
RUN chmod +x /start
|
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
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
[program:nginx]
|
||||||
|
command=/usr/sbin/nginx
|
||||||
|
autorestart=true
|
Loading…
Reference in New Issue