Add nginx
This commit is contained in:
parent
dad2258164
commit
d0dfee2531
14
Dockerfile
14
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
|
||||
|
||||
|
17
default
Normal file
17
default
Normal file
@ -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;
|
||||
}
|
||||
}
|
3
nginx.conf
Normal file
3
nginx.conf
Normal file
@ -0,0 +1,3 @@
|
||||
[program:nginx]
|
||||
command=/usr/sbin/nginx
|
||||
autorestart=true
|
Loading…
Reference in New Issue
Block a user