Docker Image packaging for Alpine. (amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x)
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
docker run -d \
--name=alpine \
-e TZ=Asia/Shanghai \
--restart unless-stopped \
snowdreamtech/alpine:latestdocker run -d \
--name=alpine \
-e TZ=Asia/Shanghai \
-v /path/to/data:/path/to/data \
--restart unless-stopped \
snowdreamtech/alpine:latestversion: "3"
services:
alpine:
image: snowdreamtech/alpine:latest
container_name: alpine
environment:
- TZ=Asia/Shanghai
restart: unless-stoppedversion: "3"
services:
alpine:
image: snowdreamtech/alpine:latest
container_name: alpine
environment:
- TZ=Asia/Shanghai
volumes:
- /path/to/data:/path/to/data
restart: unless-stoppedThis image provides several environment variables to customize its behavior.
| Variable | Default | Description |
|---|---|---|
PUID |
0 |
User ID for the running process. |
PGID |
0 |
Group ID for the running process. |
USER |
root |
Username for the running process. |
PASSWORDLESS_SUDO |
false |
Set to true to grant the mapped user passwordless sudo/doas. |
WORKDIR |
/root |
Working directory. |
UMASK |
022 |
Umask for file creation. |
DEBUG |
false |
Enable debug logging for the entrypoint. |
KEEPALIVE |
0 |
Set to 1 to keep the container running indefinitely. |
TZ |
UTC |
Timezone setting. |
CAP_NET_BIND_SERVICE |
0 |
Set to 1 to grant permission to bind to privileged ports (< 1024). |
LANG |
C.UTF-8 |
System locale and language setting. |
You can map the internal user to your host user's ID and Group ID using PUID and PGID. This is extremely useful for avoiding permission issues when using volumes.
docker run -d \
-e PUID=1000 \
-e PGID=1000 \
snowdreamtech/alpine:latestBy default, the mapped user does not have sudo or doas access. To enable passwordless privilege escalation (e.g., for development or debugging), set PASSWORDLESS_SUDO=true:
docker run -d \
-e PUID=1000 \
-e PGID=1000 \
-e PASSWORDLESS_SUDO=true \
snowdreamtech/alpine:latestSecurity note: Do not set
PASSWORDLESS_SUDO=truein production environments, as it allows the container process to escalate to root without a password.
This image supports an extension mechanism for custom initialization scripts. Any executable script placed in /usr/local/bin/entrypoint.d/ (or the project's entrypoint.d/ folder before build) will be executed in alphabetical order during container startup.
The image comes pre-installed with a curated set of essential tools:
- Shell:
bash,zsh - Editors:
vim,nano - Network:
curl,wget,rsync,git - Utils:
sudo,ca-certificates,tzdata
docker buildx create --use --name build --node build --driver-opt network=host
docker buildx build -t snowdreamtech/alpine --platform=linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/riscv64,linux/s390x . --pushThis project uses the Snowdream Tech Alpine Base Image for advanced automation.
| Suite | Goal | Commands |
|---|---|---|
| Core | Onboarding & Project Setup | init, setup, install, check-env |
| Quality | Reliability & Standards | test, lint, format, verify |
| Security | Auditing & Compliance | audit, env |
| Ops | Building & Releasing | build, release, archive-changelog |
| Maint | Tooling & Cleanup | update, cleanup |
| DX | Developer Productivity | docs, commit, bench |
For more details on the AI-first development workflow, refer to the CONVENTIONS.md.
- 使用 buildx 构建多平台 Docker 镜像
- 如何使用 docker buildx 构建跨平台 Go 镜像
- Building Multi-Arch Images for Arm and x86 with Docker Desktop
- How to Rapidly Build Multi-Architecture Images with Buildx
- Faster Multi-Platform Builds: Dockerfile Cross-Compilation Guide
- docker/buildx
Copyright (c) 2024-present SnowdreamTech Inc.