[GH-ISSUE #616] 希望docker镜像预置curl命令 #408

Closed
opened 2026-03-03 01:03:06 +03:00 by kerem · 5 comments
Owner

Originally created by @geneives233 on GitHub (Apr 14, 2025).
Original GitHub issue: https://github.com/certimate-go/certimate/issues/616

功能描述 / Description

有些证书部署是通过http请求部署的,希望添加curl命令。

请求动机 / Motivation

扩大证书部署范围

其他 / Miscellaneous

No response

贡献 / Contribution

  • 我乐意为此贡献代码! / I am interested in contributing to this feature!
Originally created by @geneives233 on GitHub (Apr 14, 2025). Original GitHub issue: https://github.com/certimate-go/certimate/issues/616 ### 功能描述 / Description 有些证书部署是通过http请求部署的,希望添加curl命令。 ### 请求动机 / Motivation 扩大证书部署范围 ### 其他 / Miscellaneous _No response_ ### 贡献 / Contribution - [ ] 我乐意为此贡献代码! / I am interested in contributing to this feature!
kerem 2026-03-03 01:03:06 +03:00
Author
Owner

@fudiwei commented on GitHub (Apr 15, 2025):

可以自行安装。

<!-- gh-comment-id:2803543713 --> @fudiwei commented on GitHub (Apr 15, 2025): 可以自行安装。
Author
Owner

@geneives233 commented on GitHub (Apr 15, 2025):

主要是不想要每次更新之后都去运行下apk add --no-cache curl命令

<!-- gh-comment-id:2803685896 --> @geneives233 commented on GitHub (Apr 15, 2025): 主要是不想要每次更新之后都去运行下apk add --no-cache curl命令
Author
Owner

@fudiwei commented on GitHub (Apr 15, 2025):

本地部署?你可以把安装依赖作为前置命令:

if ! command -v curl >/dev/null 2>&1; then
    apk add --no-cache curl
fi
<!-- gh-comment-id:2803712141 --> @fudiwei commented on GitHub (Apr 15, 2025): 本地部署?你可以把安装依赖作为前置命令: ```sh if ! command -v curl >/dev/null 2>&1; then apk add --no-cache curl fi ```
Author
Owner

@geneives233 commented on GitHub (Apr 15, 2025):

ok

<!-- gh-comment-id:2803729352 --> @geneives233 commented on GitHub (Apr 15, 2025): ok
Author
Owner

@Trashblazer commented on GitHub (Jun 28, 2025):

个人实践:重新包装 entrypoint

docker-compose.yml 同目录下建一个 entrypoint.sh 写脚本。记得 chmod +x entrypoint.sh

#!/bin/sh
if ! command -v curl >/dev/null 2>&1; then
        sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
        apk add --no-cache curl
fi

./certimate serve --http 0.0.0.0:8090

docker-compose.yml 声明entrypoint

services:
  certimate:
    image: certimate/certimate:v0.3.18
    container_name: certimate
    restart: unless-stopped
    ports:
      - 8090:8090
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - ./data:/app/pb_data
      - ./entrypoint.sh:/app/entrypoint.sh
    entrypoint: /app/entrypoint.sh

curl 用来调用其他 http hook、socket,还是很实用,建议预置。

<!-- gh-comment-id:3015102363 --> @Trashblazer commented on GitHub (Jun 28, 2025): 个人实践:重新包装 entrypoint `docker-compose.yml` 同目录下建一个 `entrypoint.sh` 写脚本。记得 `chmod +x entrypoint.sh` ```sh #!/bin/sh if ! command -v curl >/dev/null 2>&1; then sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories apk add --no-cache curl fi ./certimate serve --http 0.0.0.0:8090 ``` `docker-compose.yml` 声明entrypoint ```yml services: certimate: image: certimate/certimate:v0.3.18 container_name: certimate restart: unless-stopped ports: - 8090:8090 volumes: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro - ./data:/app/pb_data - ./entrypoint.sh:/app/entrypoint.sh entrypoint: /app/entrypoint.sh ``` curl 用来调用其他 http hook、socket,还是很实用,建议预置。
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/certimate#408
No description provided.