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"
COPY ./build /src
RUN -set ex; \
apk-build
# :: Header
FROM 11notes/alpine:stable
COPY --from=build /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-build | home directory of user docker |
| Parameter | Value | Default |
|---|---|---|
TZ |
Time Zone | |
DEBUG |
Show debug information |
- Only use rootless container runtime (podman, rootless docker)
- Allow non-root ports < 1024 via
echo "net.ipv4.ip_unprivileged_port_start=53" > /etc/sysctl.d/ports.conf - Use a reverse proxy like Traefik, Nginx to terminate TLS with a valid certificate
- Use Let’s Encrypt certificates to protect your SSL endpoints
- 1 Only use this image as a build layer in your project!
This 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.
