forked from rancher/k3os-kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dapper
65 lines (58 loc) · 1.53 KB
/
Dockerfile.dapper
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
56
57
58
59
60
61
62
63
64
65
ARG APT_GCC=library/gcc:9.2
FROM library/ubuntu:bionic AS bionic
ARG DOWNLOADS=/usr/src/downloads
ARG LINUX_FIRMWARE=linux-firmware=1.173.18
ARG LINUX_SOURCE=linux-source-5.0.0=5.0.0-47.51~18.04.1
ENV DEBIAN_FRONTEND=noninteractive
RUN set -x \
&& apt-get --assume-yes update \
&& apt-get --assume-yes download \
${LINUX_FIRMWARE} \
${LINUX_SOURCE} \
&& mkdir -vp ${DOWNLOADS} \
&& mv -vf linux-firmware* ${DOWNLOADS}/ubuntu-firmware.deb \
&& mv -vf linux-source* ${DOWNLOADS}/ubuntu-kernel.deb
FROM ${APT_GCC}
ARG DOWNLOADS=/usr/src/downloads
# Wireguard support, included in Linux in 5.6+
ARG WG_URL="https://git.zx2c4.com"
ARG WG_REPO="wireguard-linux-compat"
ARG WG_TAG=v1.0.20200413
COPY --from=bionic ${DOWNLOADS}/ ${DOWNLOADS}/
RUN apt-get update \
&& apt-get install -y \
kernel-wedge \
libncurses-dev \
fakeroot \
cpio \
bison \
flex \
ccache \
vim \
gnupg2 \
locales \
bc \
kmod \
libelf-dev \
rsync \
gawk \
libudev-dev \
pciutils-dev \
&& rm -f /bin/sh && ln -s /bin/bash /bin/sh
########## Dapper Configuration #####################
ENV DAPPER_ENV VERSION DEBUG
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_SOURCE /source
ENV DAPPER_OUTPUT ./dist ./build
ENV DAPPER_RUN_ARGS --privileged
ENV SHELL /bin/bash
WORKDIR ${DAPPER_SOURCE}
########## General Configuration #####################
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH
ENV DOWNLOADS ${DOWNLOADS}
ENV WG_URL=${WG_URL}
ENV WG_REPO=${WG_REPO}
ENV WG_TAG=${WG_TAG}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]