Sign inSign up

hjdyzy/alpine

By hjdyzy

Updated 10 months ago

A custom image based on Alpine Linux, you can modify the Dockerfile to customize your own image.

Image
Operating systems
0

112

hjdyzy/alpine repository overview

Alpine 定制镜像

基于 alpine:latest 的轻量级工具镜像,预装 git / curl / rsync / openssh-client / bash 等常用部署命令,可作为 CI/CD 与日常运维的基础镜像。

Dockerfile

# 部署用Alpine镜像
FROM alpine:latest

# 设置时区和语言
ENV TZ=Asia/Shanghai \
    LANG=C.UTF-8

# 配置阿里云镜像源(提高下载速度)
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories

# 一次性安装所有部署依赖
RUN apk add --no-cache \
        openssh-client \
        git \
        rsync \
        curl \
        bash \
        bash-completion \
        ca-certificates

# 创建SSH目录
RUN mkdir -p ~/.ssh && chmod 700 ~/.ssh

# 设置工作目录
WORKDIR /workspace

# 验证安装
RUN ssh -V && rsync --version && git --version && curl --version

构建命令示例

# 本地构建
docker build -t alpine:git-curl-rsync-20251117 .

# 标记为个人仓库镜像
docker tag alpine:git-curl-rsync-20251117 hjdyzy/alpine:git-curl-rsync-20251117

# 标记为阿里云镜像
docker tag alpine:git-curl-rsync-20251117 registry.cn-guangzhou.aliyuncs.com/zhisuaninfo/alpine:git-curl-rsync-20251117

已有版本记录

当前所有以下标签对应同一镜像,已安装的主要命令相同:

  • alpine:git-curl-rsync-20251117
  • hjdyzy/alpine:git-curl-rsync-20251117
  • registry.cn-guangzhou.aliyuncs.com/zhisuaninfo/alpine:git-curl-rsync-20251117

已包含命令:

  • openssh-client
  • git
  • rsync
  • curl
  • bash
  • bash-completion
  • ca-certificates

Tag summary

Content type

Image

Digest

sha256:e8e2490ba

Size

12.8 MB

Last updated

10 months ago

docker pull hjdyzy/alpine:git-curl-rsync-20251117