File: Dockerfile-alpine

package info (click to toggle)
dracut 110-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,356 kB
  • sloc: sh: 24,895; ansic: 5,236; makefile: 346; perl: 186; python: 48; javascript: 19
file content (55 lines) | stat: -rw-r--r-- 1,382 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Test coverage provided by this container:
# - musl (instead of glibc)
# - openrc (instead of systemd)
# - eudev (instead of systemd-udev)
# - elogind (instead of logind)
# - busybox default shell (no dash installed)
# - gzip compression
# - dbus-daemon
# - network: networkmanager

# Not installed
# - dash (to increase coverage)
# - ntfs-3g (not enabled with linux-virt)
# - erofs-utils (not enabled with linux-virt)
# - multipath-tools (does not work well)
# - kernel-install is not available

FROM docker.io/alpine:edge

# export
ARG TARGETARCH
ARG OPTION

# Use dracut-tests package to install dependencies for test suite
RUN apk add --no-cache \
    alpine-base \
    build-base \
    cargo \
    curl \
    dnsmasq \
    dracut-tests \
    efistub \
    ukify

RUN \
if [ "${TARGETARCH}" == "amd64" ]; then \
    apk add --no-cache \
        ovmf \
; fi

# workaround for https://gitlab.alpinelinux.org/alpine/aports/-/issues/17907
RUN \
  ln -sf /boot/vmlinuz-virt /boot/vmlinuz-$(cd /lib/modules; ls -1 | tail -1)

# busybox container
# replace GNU coreutils, util-linux, kmod binaries with busybox binaries
RUN \
if [ "$OPTION" == "busybox" ] ; then \
  mkdir /busybox && cd /busybox && /bin/busybox --install -s /busybox ;\
  cp -a /busybox/* /bin/ ;\
  cp -a /busybox/* /sbin/ ;\
  cp -a /busybox/* /usr/bin/ ;\
  cp -a /busybox/* /usr/sbin/ ;\
  rm -f /bin/kmod ;\
fi