Skip to content

Build Alpine image via Docker #989

Answered by SuperMaxusa
owenthereal asked this question in Q&A
Discussion options

You must be logged in to vote

Here is my proof-of-work Alpine Linux on 9pfs, feel free for suggestions.

1. Create Dockerfile

FROM i386/alpine:3.18.6

ENV KERNEL=lts
ENV HOSTNAME=localhost
ENV ROOT_PASSWORD=root

# Installing base packages, you can add additional packages here (community repo is enabled)
RUN apk add openrc alpine-base agetty alpine-conf

# Install newer mkinitfs from edge (todo: remove this when 3.19+ has worked properly with 9pfs)
RUN apk add mkinitfs --no-cache --allow-untrusted --repository https://dl-cdn.alpinelinux.org/alpine/edge/main/ 

# Installing kernel and remove unused drivers for linux-lts
RUN if [ "$KERNEL" == "lts" ]; then \
    apk add linux-lts linux-firmware-none; \
else \
    apk ad…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@SuperMaxusa
Comment options

@progrium
Comment options

@copy
Comment options

@SuperMaxusa
Comment options

@progrium
Comment options

Answer selected by copy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants