Run Alpine build tools as build layer. Small, lightweight, secure and fast 🏔️
1.4K

Build custom APK's with Docker
What can I do with this? Well simply put, you can build your own APK for Alpine within Docker in a build layer. This gives you the ability to use your custom APK with the normal installer.
# :: Build
FROM 11notes/apk-build:stable as build
ENV APK_NAME="custom"
RUN set -ex; \
cd ~; \
newapkbuild ${APK_NAME};
COPY ./build /apk/${APK_NAME}
RUN set -ex; \
cd ~/${APK_NAME}; \
abuild checksum; \
abuild -r;
# :: Header
FROM 11notes/alpine:stable
COPY --from=build /apk/packages/apk /apk/custom <sup>1</sup>
RUN set -ex; \
apk add --no-cache --allow-untrusted --repository /apk/custom \
custom; \
| Parameter | Value | Description |
|---|---|---|
user | docker | user docker |
uid | 1000 | user id 1000 |
gid | 1000 | group id 1000 |
home | /apk | home directory of user docker |
| Parameter | Value | Default |
|---|---|---|
TZ | Time Zone | |
DEBUG | Show debug information |
echo "net.ipv4.ip_unprivileged_port_start=53" > /etc/sysctl.d/ports.confThis image is provided to you at your own risk. Always make backups before updating an image to a new version. Check the changelog for breaking changes.
Content type
Image
Digest
sha256:51ce05619…
Size
87.4 MB
Last updated
over 1 year ago
docker pull 11notes/apk-build:stable