kopia lustrzana https://github.com/linuxserver/docker-documentation
91 wiersze
58 KiB
HTML
91 wiersze
58 KiB
HTML
![]() |
<!doctype html><html lang=en class=no-js> <head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Welcome to the home of the LinuxServer.io documentation!"><meta name=author content=LinuxServer.io><link href=https://docs.linuxserver.io/images/docker-netbootxyz/ rel=canonical><link rel=icon href="https://gblobscdn.gitbook.com/spaces%2F-LWuIse8qFJj2MqDi90T%2Favatar-1590244439115.png?alt=media"><meta name=generator content="mkdocs-1.4.2, mkdocs-material-8.5.10"><title>netbootxyz - LinuxServer.io</title><link rel=stylesheet href=../../assets/stylesheets/main.472b142f.min.css><link rel=stylesheet href=../../assets/stylesheets/palette.08040f6c.min.css><link rel=preconnect href=https://fonts.gstatic.com crossorigin><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback"><style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style><script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script></head> <body dir=ltr data-md-color-scheme=default data-md-color-primary=purple data-md-color-accent=indigo> <script>var palette=__md_get("__palette");if(palette&&"object"==typeof palette.color)for(var key of Object.keys(palette.color))document.body.setAttribute("data-md-color-"+key,palette.color[key])</script> <input class=md-toggle data-md-toggle=drawer type=checkbox id=__drawer autocomplete=off> <input class=md-toggle data-md-toggle=search type=checkbox id=__search autocomplete=off> <label class=md-overlay for=__drawer></label> <div data-md-component=skip> <a href=#linuxservernetbootxyz class=md-skip> Skip to content </a> </div> <div data-md-component=announce> </div> <header class=md-header data-md-component=header> <nav class="md-header__inner md-grid" aria-label=Header> <a href=../.. title=LinuxServer.io class="md-header__button md-logo" aria-label=LinuxServer.io data-md-component=logo> <img src="https://gblobscdn.gitbook.com/spaces%2F-LWuIse8qFJj2MqDi90T%2Favatar-1590244439115.png?alt=media" alt=logo> </a> <label class="md-header__button md-icon" for=__drawer> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg> </label> <div class=md-header__title data-md-component=header-title> <div class=md-header__ellipsis> <div class=md-header__topic> <span class=md-ellipsis> LinuxServer.io </span> </div> <div class=md-header__topic data-md-component=header-topic> <span class=md-ellipsis> netbootxyz </span> </div> </div> </div> <form class=md-header__option data-md-component=palette> <input class=md-option data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme=default data-md-color-primary=purple data-md-color-accent=indigo aria-label="Switch to dark mode" type=radio name=__palette id=__palette_1> <label class="md-header__button md-icon" title="Switch to dark mode" for=__palette_2 hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M17 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6zm0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4zM7 9c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg> </label> <input class=md-option data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme=slate data-md-color-primary=purple data-md-color-accent=indigo aria-label="Switch to light mode" type=radio name=__palette id=__palette_2> <label class="md-header__button md-icon" title="Switch to light mode" for=__palette_1 hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M17 7H7a5 5 0 0 0-5 5 5 5 0 0 0 5 5h10a5 5 0 0 0 5-5 5 5 0 0 0-5-5m0 8a3 3 0 0 1-3-3 3 3 0 0 1 3-3 3 3 0 0 1 3 3 3 3 0 0 1-3 3Z"/></svg> </label> </form> <label class="md-header__button md-icon" for=__s
|
||
|
set service dhcp-server use-dnsmasq enable
|
||
|
set service dns forwarding options "dhcp-match=set:bios,60,PXEClient:Arch:00000"
|
||
|
set service dns forwarding options "dhcp-boot=tag:bios,netboot.xyz.kpxe,,SERVERIP"
|
||
|
set service dns forwarding options "dhcp-match=set:efi32,60,PXEClient:Arch:00002"
|
||
|
set service dns forwarding options "dhcp-boot=tag:efi32,netboot.xyz.efi,,SERVERIP"
|
||
|
set service dns forwarding options "dhcp-match=set:efi32-1,60,PXEClient:Arch:00006"
|
||
|
set service dns forwarding options "dhcp-boot=tag:efi32-1,netboot.xyz.efi,,SERVERIP"
|
||
|
set service dns forwarding options "dhcp-match=set:efi64,60,PXEClient:Arch:00007"
|
||
|
set service dns forwarding options "dhcp-boot=tag:efi64,netboot.xyz.efi,,SERVERIP"
|
||
|
set service dns forwarding options "dhcp-match=set:efi64-1,60,PXEClient:Arch:00008"
|
||
|
set service dns forwarding options "dhcp-boot=tag:efi64-1,netboot.xyz.efi,,SERVERIP"
|
||
|
set service dns forwarding options "dhcp-match=set:efi64-2,60,PXEClient:Arch:00009"
|
||
|
set service dns forwarding options "dhcp-boot=tag:efi64-2,netboot.xyz.efi,,SERVERIP"
|
||
|
commit; save
|
||
|
</code></pre> <h4 id=dd-wrt>DD-WRT</h4> <p>Administration -> Services -> Additional DNSMasq Options Set the following lines: </p> <pre><code>dhcp-match=set:bios,60,PXEClient:Arch:00000
|
||
|
dhcp-boot=tag:bios,netboot.xyz.kpxe,,YOURSERVERIP
|
||
|
dhcp-match=set:efi32,60,PXEClient:Arch:00002
|
||
|
dhcp-boot=tag:efi32,netboot.xyz.efi,,YOURSERVERIP
|
||
|
dhcp-match=set:efi32-1,60,PXEClient:Arch:00006
|
||
|
dhcp-boot=tag:efi32-1,netboot.xyz.efi,,YOURSERVERIP
|
||
|
dhcp-match=set:efi64,60,PXEClient:Arch:00007
|
||
|
dhcp-boot=tag:efi64,netboot.xyz.efi,,YOURSERVERIP
|
||
|
dhcp-match=set:efi64-1,60,PXEClient:Arch:00008
|
||
|
dhcp-boot=tag:efi64-1,netboot.xyz.efi,,YOURSERVERIP
|
||
|
dhcp-match=set:efi64-2,60,PXEClient:Arch:00009
|
||
|
dhcp-boot=tag:efi64-2,netboot.xyz.efi,,YOURSERVERIP
|
||
|
</code></pre> <h4 id=tomato>Tomato</h4> <p>Advanced -> DHCP/DNS -> Dnsmasq Custom configuration Set the following lines: </p> <pre><code>dhcp-match=set:bios,60,PXEClient:Arch:00000
|
||
|
dhcp-boot=tag:bios,netboot.xyz.kpxe,,YOURSERVERIP
|
||
|
dhcp-match=set:efi32,60,PXEClient:Arch:00002
|
||
|
dhcp-boot=tag:efi32,netboot.xyz.efi,,YOURSERVERIP
|
||
|
dhcp-match=set:efi32-1,60,PXEClient:Arch:00006
|
||
|
dhcp-boot=tag:efi32-1,netboot.xyz.efi,,YOURSERVERIP
|
||
|
dhcp-match=set:efi64,60,PXEClient:Arch:00007
|
||
|
dhcp-boot=tag:efi64,netboot.xyz.efi,,YOURSERVERIP
|
||
|
dhcp-match=set:efi64-1,60,PXEClient:Arch:00008
|
||
|
dhcp-boot=tag:efi64-1,netboot.xyz.efi,,YOURSERVERIP
|
||
|
dhcp-match=set:efi64-2,60,PXEClient:Arch:00009
|
||
|
dhcp-boot=tag:efi64-2,netboot.xyz.efi,,YOURSERVERIP
|
||
|
</code></pre> <h4 id=openwrt>OpenWRT</h4> <pre><code>uci set dhcp.@dnsmasq[0].dhcp_match=set:bios,60,PXEClient:Arch:00000
|
||
|
uci set dhcp.@dnsmasq[0].dhcp_boot=tag:bios,netboot.xyz.kpxe,,YOURSERVERIP
|
||
|
uci set dhcp.@dnsmasq[0].dhcp_match=set:efi32,60,PXEClient:Arch:00002
|
||
|
uci set dhcp.@dnsmasq[0].dhcp_boot=tag:efi32,netboot.xyz.efi,,YOURSERVERIP
|
||
|
uci set dhcp.@dnsmasq[0].dhcp_match=set:efi32-1,60,PXEClient:Arch:00006
|
||
|
uci set dhcp.@dnsmasq[0].dhcp_boot=tag:efi32-1,netboot.xyz.efi,,YOURSERVERIP
|
||
|
uci set dhcp.@dnsmasq[0].dhcp_match=set:efi64,60,PXEClient:Arch:00007
|
||
|
uci set dhcp.@dnsmasq[0].dhcp_boot=tag:efi64,netboot.xyz.efi,,YOURSERVERIP
|
||
|
uci set dhcp.@dnsmasq[0].dhcp_match=set:efi64-1,60,PXEClient:Arch:00008
|
||
|
uci set dhcp.@dnsmasq[0].dhcp_boot=tag:efi64-1,netboot.xyz.efi,,YOURSERVERIP
|
||
|
uci set dhcp.@dnsmasq[0].dhcp_match=set:efi64-2,60,PXEClient:Arch:00009
|
||
|
uci set dhcp.@dnsmasq[0].dhcp_boot=tag:efi64-2,netboot.xyz.efi,,YOURSERVERIP
|
||
|
uci commit
|
||
|
/etc/init.d/dnsmasq restart
|
||
|
</code></pre> <h4 id=microsoft-server-dhcp>Microsoft Server DHCP</h4> <ul> <li>Run the DHCP program</li> <li>Under Scope/Scope Options</li> <li>check option 066 and enter the FQDN or IP of your TFTP boot server</li> <li>check option 067 and enter one of the following bootfile names:</li> <li>Default BIOS file name- netboot.xyz.kpxe</li> <li>UEFI 32 bit file name- netboot.xyz.efi</li> <li>UEFI 64 bit file name- netboot.xyz.efi</li> </ul> <p>Anything else from a router standpoint is a crapshoot for supporting Dnsmasq options or proprietary PXE boot options, check Google for support (try your exact router model number with 'pxe boot') or look into setting up your own DHCP server in Linux.</p> <p>This image also contains <code>netboot.xyz.efi</code> which can be used to boot using UEFI network boot. The UEFI boot and menu will have limited functionality if you choose to use it.</p> <h2 id=usage>Usage</h2> <p>To help you get started creating a container from this image you can either use docker-compose or the docker cli.</p> <h3 id=docker-compose-recommended-click-here-for-more-info>docker-compose (recommended, <a href=https://docs.linuxserver.io/general/docker-compose>click here for more info</a>)</h3> <pre><code class=language-yaml>---
|
||
|
version: "2.1"
|
||
|
services:
|
||
|
netbootxyz:
|
||
|
image: lscr.io/linuxserver/netbootxyz:latest
|
||
|
container_name: netbootxyz
|
||
|
environment:
|
||
|
- PUID=1000
|
||
|
- PGID=1000
|
||
|
- MENU_VERSION=1.9.9 #optional
|
||
|
- PORT_RANGE=30000:30010 #optional
|
||
|
- SUBFOLDER=/ #optional
|
||
|
volumes:
|
||
|
- /path/to/config:/config
|
||
|
- /path/to/assets:/assets #optional
|
||
|
ports:
|
||
|
- 3000:3000
|
||
|
- 69:69/udp
|
||
|
- 8080:80 #optional
|
||
|
restart: unless-stopped
|
||
|
</code></pre> <h3 id=docker-cli-click-here-for-more-info>docker cli (<a href=https://docs.docker.com/engine/reference/commandline/cli/ >click here for more info</a>)</h3> <pre><code class=language-bash>docker run -d \
|
||
|
--name=netbootxyz \
|
||
|
-e PUID=1000 \
|
||
|
-e PGID=1000 \
|
||
|
-e MENU_VERSION=1.9.9 `#optional` \
|
||
|
-e PORT_RANGE=30000:30010 `#optional` \
|
||
|
-e SUBFOLDER=/ `#optional` \
|
||
|
-p 3000:3000 \
|
||
|
-p 69:69/udp \
|
||
|
-p 8080:80 `#optional` \
|
||
|
-v /path/to/config:/config \
|
||
|
-v /path/to/assets:/assets `#optional` \
|
||
|
--restart unless-stopped \
|
||
|
lscr.io/linuxserver/netbootxyz:latest
|
||
|
</code></pre> <h2 id=parameters>Parameters</h2> <p>Docker images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <code><external>:<internal></code> respectively. For example, <code>-p 8080:80</code> would expose port <code>80</code> from inside the container to be accessible from the host's IP on port <code>8080</code> outside the container.</p> <h3 id=ports-p>Ports (<code>-p</code>)</h3> <table> <thead> <tr> <th align=center>Parameter</th> <th>Function</th> </tr> </thead> <tbody> <tr> <td align=center><code>3000</code></td> <td>Web configuration interface.</td> </tr> <tr> <td align=center><code>69/udp</code></td> <td>TFTP Port.</td> </tr> <tr> <td align=center><code>80</code></td> <td>NGINX server for hosting assets.</td> </tr> </tbody> </table> <h3 id=environment-variables-e>Environment Variables (<code>-e</code>)</h3> <table> <thead> <tr> <th align=center>Env</th> <th>Function</th> </tr> </thead> <tbody> <tr> <td align=center><code>PUID=1000</code></td> <td>for UserID - see below for explanation</td> </tr> <tr> <td align=center><code>PGID=1000</code></td> <td>for GroupID - see below for explanation</td> </tr> <tr> <td align=center><code>MENU_VERSION=1.9.9</code></td> <td>Specify a specific version of boot files you want to use from NETBOOT.XYZ (unset pulls latest)</td> </tr> <tr> <td align=center><code>PORT_RANGE=30000:30010</code></td> <td>Specify the port range tftp will use for data transfers <a href=https://en.wikipedia.org/wiki/Trivial_File_Transfer_Protocol#Details>(see Wikipedia)</a></td> </tr> <tr> <td align=center><code>SUBFOLDER=/</code></td> <td>Specify a sobfolder if running this behind a reverse proxy (IE /proxy/)</td> </tr> </tbody> </table> <h3 id=volume-mappings-v>Volume Mappings (<code>-v</code>)</h3> <table> <thead> <tr> <th align=center>Volume</th> <th>Function</th> </tr> </thead> <tbody> <tr> <td align=center><code>/config</code></td> <td>Storage for boot menu files and web application config</td> </tr> <tr> <td align=center><code>/assets</code></td> <td>Storage for NETBOOT.XYZ bootable assets (live CDs and other files)</td> </tr> </tbody> </table> <h4 id=miscellaneous-options>Miscellaneous Options</h4> <table> <thead> <tr> <th align=center>Parameter</th> <th>Function</th> </tr> </thead> <tbody> <tr> <td></td> <td></td> </tr> </tbody> </table> <h2 id=environment-variables-from-files-docker-secrets>Environment variables from files (Docker secrets)</h2> <p>You can set any environment variable from a file by using a special prepend <code>FILE__</code>.</p> <p>As an example:</p> <pre><code class=language-bash>-e FILE__PASSWORD=/run/secrets/mysecretpassword
|
||
|
</code></pre> <p>Will set the environment variable <code>PASSWORD</code> based on the contents of the <code>/run/secrets/mysecretpassword</code> file.</p> <h2 id=umask-for-running-applications>Umask for running applications</h2> <p>For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional <code>-e UMASK=022</code> setting. Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up <a href=https://en.wikipedia.org/wiki/Umask>here</a> before asking for support.</p> <h2 id=user-group-identifiers>User / Group Identifiers</h2> <p>When using volumes (<code>-v</code> flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user <code>PUID</code> and group <code>PGID</code>.</p> <p>Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.</p> <p>In this instance <code>PUID=1000</code> and <code>PGID=1000</code>, to find yours use <code>id user</code> as below:</p> <pre><code class=language-bash> $ id username
|
||
|
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
|
||
|
</code></pre> <h2 id=docker-mods>Docker Mods</h2> <p><a href="https://mods.linuxserver.io/?mod=netbootxyz" title="view available mods for this container."><img alt="Docker Mods" src="https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=netbootxyz&query=%24.mods%5B%27netbootxyz%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml"></a> <a href="https://mods.linuxserver.io/?mod=universal" title="view available universal mods."><img alt="Docker Universal Mods" src="https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=universal&query=%24.mods%5B%27universal%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml"></a></p> <p>We publish various <a href=https://github.com/linuxserver/docker-mods>Docker Mods</a> to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.</p> <h2 id=support-info>Support Info</h2> <ul> <li>Shell access whilst the container is running:</li> <li><code>docker exec -it netbootxyz /bin/bash</code></li> <li>To monitor the logs of the container in realtime:</li> <li><code>docker logs -f netbootxyz</code></li> <li>Container version number</li> <li><code>docker inspect -f '{{ index .Config.Labels "build_version" }}' netbootxyz</code></li> <li>Image version number</li> <li><code>docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/netbootxyz:latest</code></li> </ul> <h2 id=versions>Versions</h2> <ul> <li><strong>12.10.22:</strong> - Rebasing to Alpine 3.16, migrate to s6v3.</li> <li><strong>29.04.21:</strong> - Rebasing to alpine 3.13, add SUBFOLDER env variable.</li> <li><strong>01.06.20:</strong> - Rebasing to alpine 3.12.</li> <li><strong>19.12.19:</strong> - Rebasing to alpine 3.11.</li> <li><strong>13.12.19:</strong> - Swapping latest tag over to webapp stack for management.</li> <li><strong>10.12.19:</strong> - Adding tftp branch to provide tftp only option to latest users.</li> <li><strong>22.10.19:</strong> - Initial release.</li> </ul> </article> </div> </div> </main> <footer class=md-footer> <nav class="md-footer__inner md-grid" aria-label=Footer> <a href=../docker-nano/ class="md-footer__link md-footer__link--prev" aria-label="Previous: nano" rel=prev> <div class="md-footer__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg> </div> <div class=md-footer__title> <div class=md-ellipsis> <span class=md-footer__direction> Previous </span> nano </div> </div> </a> <a href=../docker-netbox/ class="md-footer__link md-footer__link--next" aria-label="Next: netbox" rel=next> <div class=md-footer__title> <div class=md-ellipsis> <span class=md-footer__direction> Next </span> netbox </div> </div> <div class="md-footer__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4Z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-copyright> <div class=md-copyright__highlight> Copyright © 2022 LinuxServer.io </div> Made with <a href=https://squidfunk.github.io/mkdocs-material/ target=_blank rel=noopener> Material for MkDocs </a> </div> <div class=md-social> <a href=https://github.com/linuxserver target=_blank rel=noopener title=github.com class=md-social__link> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 448 512"><!-- Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48
|