NewFuture / DDNS

:triangular_flag_on_post: 自动更新域名解析到本机IP(支持dnspod,阿里DNS,CloudFlare,华为云,DNSCOM...)
https://ddns.newfuture.cc/
MIT License
4.22k stars 651 forks source link

[feature]Docker 镜像添加 curl #407

Closed IIIlllIIllIIIll closed 9 months ago

IIIlllIIllIIIll commented 10 months ago

描述场景和问题 (Is your feature request related to a problem? Please describe)

alpine 自带的 wget 功能少,不能指定使用 ipv4 访问网站。

解决方案或者思路 (Describe the solution you'd like)

Dockerfile 添加 RUN apk --no-cache add curl

NN708 commented 9 months ago

我们的镜像是基于 Alpine 构建的最小镜像,wget 是 BusyBox 中提供的精简版。然而,多安装一个包对我们目前 8-9 MB 的镜像而言增加的大小是相当可观的,因此我不建议将其包含在官方镜像中,您有需要可以自己在本地安装。

IIIlllIIllIIIll commented 9 months ago

加上 RUN /bin/sh -c apk --no-cache add curl 后, 体积增加 1 ~ 2 MB.

本地安装可以参考以下 docker-compose.yml 配置

version: "3"
services:
  ddns:
    build:
      context: .
      dockerfile_inline: |
        FROM newfuture/ddns:latest
        RUN apk --no-cache add curl