diff --git a/Others/dhcp/4.4.3/24.03-lts-sp1/Dockerfile b/Others/dhcp/4.4.3/24.03-lts-sp1/Dockerfile index b8568596998d366a97f0131a73c3ec7caef1395e..aaa04b1b17d8094116c1fb4f6a4b5f5e1977c380 100644 --- a/Others/dhcp/4.4.3/24.03-lts-sp1/Dockerfile +++ b/Others/dhcp/4.4.3/24.03-lts-sp1/Dockerfile @@ -15,4 +15,6 @@ RUN wget https://ftp.isc.org/isc/dhcp/${VERSION}/dhcp-${VERSION}.tar.gz \ && make -j$(nproc) \ && make install +RUN mkdir -p /var/db && touch /var/db/dhcpd.leases + CMD ["/usr/local/dhcp/sbin/dhcpd", "--help"] \ No newline at end of file diff --git a/Others/dhcp/README.md b/Others/dhcp/README.md new file mode 100644 index 0000000000000000000000000000000000000000..36e290e5cbe20dc6fe5d46d59d1f38bf9dcec920 --- /dev/null +++ b/Others/dhcp/README.md @@ -0,0 +1,67 @@ +# Quick reference + +- The official DHCP docker image. + +- Maintained by: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative). + +- Where to get help: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative), [openEuler](https://gitee.com/openeuler/community). + +# DHCP | openEuler +Current dhcp docker images are built on the [openEuler](https://repo.openeuler.org/). This repository is free to use and exempted from per-user rate limits. + +DHCP, or Dynamic Host Configuration Protocol, is a network management protocol that automatically assigns IP addresses and other network configuration parameters to devices on a network. + +Learn more about DHCP on [DHCP Website](https://www.isc.org/blogs/isc-dhcp-eol/)⁠. + +# Supported tags and respective Dockerfile links +The tag of each `dhcp` docker image is consist of the version of `dhcp` and the version of basic image. The details are as follows + +| Tag | Currently | Architectures | +|----------|-------------|------------------| +|[4.4.3-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/dhcp/4.4.3/24.03-lts-sp1/Dockerfile)| DHCP 4.4.3 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +# Usage +In this usage, users can select the corresponding `{Tag}` based on their requirements. + +- Pull the `openeuler/dhcp` image from docker + + ```bash + docker pull openeuler/dhcp:{Tag} + ``` + +- Run with an interactive shell + + You can also start the container with an interactive shell to use dhcp. + ``` + docker run -it --rm openeuler/dhcp:{Tag} bash + ``` + +- Create the `dhcpd.conf` file + + Add a subnet declaration matching the `eth0` interface`s IP. For example: + ``` + # Configure subnet based on eth0's IP (172.17.0.7) + subnet 172.17.0.0 netmask 255.255.0.0 { + range 172.17.1.100 172.17.1.200; # Allocatable IP range + option routers 172.17.0.1; # Default gateway (modify as needed) + option domain-name-servers 8.8.8.8; # DNS server + default-lease-time 600; # Default lease time (seconds) + max-lease-time 7200; + } + ``` + **Key Points:** + * The subnet range and netmask must cover eth0`s IP(172.17.0.7). + * If your actual network is `172.17.0.0/24`, change the netmask to `255.255.255.0`. + +- Specify listening interface(Optional) + + Force binding to `eth0` during startup: + ``` + /usr/local/dhcp/sbin/dhcpd -cf /tmp/dhcp/dhcpd.conf eth0 -f + ``` + **Notes:** + * The `-f` flag keeps the process in foreground or debugging. + * Omit `-f` to run as a background daemon. + +# Question and answering +If you have any questions or want to use some special features, please submit an issue or a pull request on [openeuler-docker-images](https://gitee.com/openeuler/openeuler-docker-images). \ No newline at end of file diff --git a/Others/dhcp/doc/image-info.yml b/Others/dhcp/doc/image-info.yml new file mode 100644 index 0000000000000000000000000000000000000000..23a86e14cbdd092c67004d2f4c60c0c4b0ae0dcd --- /dev/null +++ b/Others/dhcp/doc/image-info.yml @@ -0,0 +1,62 @@ +name: dhcp +category: others +description: DHCP(动态主机配置协议)是一种网络协议,自动给局域网中的设备分配 IP 地址、网关、DNS 等网络配置参数。 +environment: | + 本应用在Docker环境中运行,安装Docker执行如下命令 + ``` + yum install -y docker + ``` +tags: | + dhcp镜像的Tag由其版本信息和基础镜像版本信息组成,详细内容如下 + + | Tag | Currently | Architectures | + |----------|-------------|------------------| + |[4.4.3-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/dhcp/4.4.3/24.03-lts-sp1/Dockerfile)| DHCP 4.4.3 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +download: | + 拉取镜像到本地 + ``` + docker pull openeuler/dhcp:{Tag} + ``` + +usage: | + - 交互式shell启动进入容器中 + + 通过交互式 Shell 启动容器,使用DHCP: + ``` + docker run -it --rm openeuler/dhcp:{Tag} bash + ``` + + - 创建文件`dhcpd.conf` + + 添加与 eth0 接口 IP 匹配的子网声明。例如: + ``` + # 根据 eth0 的 IP (172.17.0.7) 配置子网 + subnet 172.17.0.0 netmask 255.255.0.0 { + range 172.17.1.100 172.17.1.200; # 可分配的 IP 范围 + option routers 172.17.0.1; # 默认网关(根据实际修改) + option domain-name-servers 8.8.8.8; # DNS 服务器 + default-lease-time 600; # 默认租约时间(秒) + max-lease-time 7200; + } + ``` + **关键点:** + * subnet 的网段和掩码必须覆盖 `eth0` 的 IP(`172.17.0.7`)。 + * 如果实际网络是 `172.17.0.0/24`,则将 netmask 改为 `255.255.255.0`。 + + - 指定监听接口(可选) + + 启动时强制绑定到 `eth0`: + ``` + /usr/local/dhcp/sbin/dhcpd -cf /tmp/dhcp/dhcpd.conf eth0 -f + ``` + **说明:** + * `-f` 参数:使进程保持在前台运行,便于调试。 + * 省略 `-f`:则以守护进程(后台)模式运行。 + +license: MPL 2.0 +similar_packages: + - dnsmasq: dnsmasq 是一个轻量级的网络服务程序,常用于 本地 DNS 缓存、DHCP 服务、TFTP、PXE 引导等小型网络环境。 +dependency: + - libcap + - libc diff --git a/Others/dhcp/doc/picture/logo.png b/Others/dhcp/doc/picture/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..ede584051fb7f8563b75258bba43db2b4ee35e08 Binary files /dev/null and b/Others/dhcp/doc/picture/logo.png differ diff --git a/Others/dnsmasq/README.md b/Others/dnsmasq/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b40a6dbe26e1834820c93b263a778216368b50ef --- /dev/null +++ b/Others/dnsmasq/README.md @@ -0,0 +1,75 @@ +# Quick reference + +- The official dnsmasq docker image. + +- Maintained by: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative). + +- Where to get help: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative), [openEuler](https://gitee.com/openeuler/community). + +# dnsmasq | openEuler +Current dnsmasq docker images are built on the [openEuler](https://repo.openeuler.org/). This repository is free to use and exempted from per-user rate limits. + +dnsmasq is the world's largest software registry. Open source developers from every continent use dnsmasq to share and borrow packages, and many organizations use dnsmasq to manage private development as well. + +Learn more about dnsmasq on [dnsmasq Website](https://docs.dnsmasqjs.com/about-dnsmasq)⁠. + +# Supported tags and respective Dockerfile links +The tag of each `dnsmasq` docker image is consist of the version of `dnsmasq` and the version of basic image. The details are as follows + +| Tag | Currently | Architectures | +|----------|-------------|------------------| +|[2.91-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/dnsmasq/2.91/24.03-lts-sp1/Dockerfile)| dnsmasq 2.91 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +# Usage +In this usage, users can select the corresponding `{Tag}` based on their requirements. + +- Pull the `openeuler/dnsmasq` image from docker + + ```bash + docker pull openeuler/dnsmasq:{Tag} + ``` + +- Run with an interactive shell + + You can also start the container with an interactive shell to use dnsmasq. + ``` + docker run -it --rm openeuler/dnsmasq:{Tag} bash + ``` + +- Create the `/etc/dnsmasq.conf` file + + Create a local configuration file `dnsmasq.conf` with the following content: + ``` + # dnsmasq.conf + no-resolv + address=/test.local/192.168.1.100 + log-queries + log-facility=/var/log/dnsmasq.log + ``` + +- Start the `dnsmasq` service in background + + ``` + nohup dnsmasq --no-daemon & + ``` + To make sure it`s running: + ``` + ps aux | grep dnsmasq + ``` + +- Test using the `dig` command: + + ``` + dnf install -y bind-utils + dig @127.0.0.1 test.local + ``` + +- Expected output (similar to): + + ``` + ;; ANSWER SECTION: + test.local. 0 IN A 192.168.1.100 + ``` + +# Question and answering +If you have any questions or want to use some special features, please submit an issue or a pull request on [openeuler-docker-images](https://gitee.com/openeuler/openeuler-docker-images). \ No newline at end of file diff --git a/Others/dnsmasq/doc/image-info.yml b/Others/dnsmasq/doc/image-info.yml new file mode 100644 index 0000000000000000000000000000000000000000..495f0ef20c1b6075ded89e1adc20eca292f68895 --- /dev/null +++ b/Others/dnsmasq/doc/image-info.yml @@ -0,0 +1,72 @@ +name: dnsmasq +category: others +description: dnsmasq 是一个轻量级的网络服务程序,常用于 本地 DNS 缓存、DHCP 服务、TFTP、PXE 引导等小型网络环境。 +environment: | + 本应用在Docker环境中运行,安装Docker执行如下命令 + ``` + yum install -y docker + ``` +tags: | + dnsmasq镜像的Tag由其版本信息和基础镜像版本信息组成,详细内容如下 + + | Tag | Currently | Architectures | + |----------|-------------|------------------| + |[2.91-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/dnsmasq/2.91/24.03-lts-sp1/Dockerfile)| dnsmasq 2.91 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +download: | + 拉取镜像到本地 + ``` + docker pull openeuler/dnsmasq:{Tag} + ``` + +usage: | + - 以交互式Shell运行容器: + + 通过交互式 Shell 启动容器,使用dnsmasq命令: + ``` + docker run -it --rm openeuler/dnsmasq:{Tag} bash + ``` + + - 创建配置文件`/etc/dnsmasq.conf` + + 配置文件`dnsmasq.conf`内容如下: + ``` + # dnsmasq.conf + no-resolv + address=/test.local/192.168.1.100 + log-queries + log-facility=/var/log/dnsmasq.log + ``` + + - 后台启动`dnsmasq`服务 + + ``` + nohup dnsmasq --no-daemon & + ``` + + 检查是否运行: + ``` + ps aux | grep dnsmasq + ``` + + - 使用`dig`命令测试: + + 需要安装bind-utils软件包,包含dig命令 + ``` + dnf install -y bind-utils + dig @127.0.0.1 test.local + ``` + + - 输出类似: + + ``` + ;; ANSWER SECTION: + test.local. 0 IN A 192.168.1.100 + ``` + +license: GPLv2 +similar_packages: + - CoreDNS : CoreDNS 是一个现代化、灵活、模块化的 DNS 服务器,它是云原生环境(如 Kubernetes)中默认的 DNS 服务组件,用于服务发现和 DNS 名称解析。 +dependency: + - libdbus + - systemd diff --git a/Others/dnsmasq/doc/picture/logo.png b/Others/dnsmasq/doc/picture/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..abdf3ba488c967ff49329816f013d501c1669fdc Binary files /dev/null and b/Others/dnsmasq/doc/picture/logo.png differ