mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-01-04 03:48:55 +02:00
fix nginx
This commit is contained in:
parent
9591c062e3
commit
8af2695ecd
@ -7,14 +7,24 @@ available data storage devices (like hard disks) or installed operating
|
||||
systems.
|
||||
|
||||
## docker-compose.yml
|
||||
|
||||
```yaml
|
||||
pxe:
|
||||
image: vimagick/dnsmasq
|
||||
net: host
|
||||
volumes:
|
||||
- ./dnsmasq.conf:/etc/dnsmasq.d/dnsmasq.conf
|
||||
- ./tftpboot:/tftpboot
|
||||
net: host
|
||||
restart: always
|
||||
|
||||
web:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./html:/var/lib/nginx/html
|
||||
restsart: always
|
||||
```
|
||||
|
||||
## dnsmasq.conf
|
||||
@ -35,6 +45,36 @@ tftp-root=/tftpboot
|
||||
|
||||
> You can get all `dhcp-option` codes via `dnsmasq --help dhcp`.
|
||||
|
||||
## nginx.conf
|
||||
|
||||
```
|
||||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
location / {
|
||||
root html;
|
||||
index index.html index.htm;
|
||||
autoindex on;
|
||||
}
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## up and running
|
||||
|
||||
```bash
|
||||
@ -44,6 +84,10 @@ mkdir tftpboot
|
||||
wget http://ftp.nl.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/netboot.tar.gz
|
||||
tar xzf netboot.tar.gz -C tftpboot
|
||||
|
||||
mkdir html
|
||||
wget http://cdimage.debian.org/debian-cd/8.5.0/amd64/iso-cd/debian-8.5.0-amd64-CD-1.iso
|
||||
mount debian-8.5.0-amd64-CD-1.iso html
|
||||
|
||||
docker-compose up -d
|
||||
docker-compose logs -f
|
||||
```
|
||||
|
@ -1,7 +1,16 @@
|
||||
pxe:
|
||||
image: vimagick/dnsmasq
|
||||
net: host
|
||||
volumes:
|
||||
- ./dnsmasq.conf:/etc/dnsmasq.d/dnsmasq.conf
|
||||
- ./tftpboot:/tftpboot
|
||||
net: host
|
||||
restart: always
|
||||
|
||||
web:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./html:/var/lib/nginx/html
|
||||
restsart: always
|
||||
|
25
dnsmasq/pxe/nginx.conf
Normal file
25
dnsmasq/pxe/nginx.conf
Normal file
@ -0,0 +1,25 @@
|
||||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
location / {
|
||||
root html;
|
||||
index index.html index.htm;
|
||||
autoindex on;
|
||||
}
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
}
|
||||
}
|
@ -6,7 +6,9 @@ FROM alpine
|
||||
|
||||
MAINTAINER kev <noreply@easypi.info>
|
||||
|
||||
RUN apk add --no-cache nginx
|
||||
RUN set -xe \
|
||||
&& apk add --no-cache nginx \
|
||||
&& mkdir -p /run/nginx
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
@ -6,7 +6,9 @@ FROM easypi/alpine-arm
|
||||
|
||||
MAINTAINER EasyPi Software Foundation
|
||||
|
||||
RUN apk add --no-cache nginx
|
||||
RUN set -xe \
|
||||
&& apk add --no-cache nginx \
|
||||
&& mkdir -p /run/nginx
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user