-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker,drbd: ensure build on all Ubuntu kernels
Ubuntu has multiple kernel versions that may use different GCC versions. In order to install all GCC versions that are needed to build kernel modules, we can use the "dkms" package. We don't want to install any unnecessary dependencies, so we parse the dependencies and select all gcc packages. Signed-off-by: Moritz Wanzenböck <[email protected]>
- Loading branch information
Showing
3 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
FROM ubuntu:bionic | ||
MAINTAINER Roland Kammerer <[email protected]> | ||
|
||
RUN apt-get update && apt-get upgrade -y && apt-get install -y kmod gnupg wget make gcc patch curl && apt-get clean | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install --no-install-recommends -y \ | ||
ca-certificates \ | ||
kmod \ | ||
gnupg \ | ||
wget \ | ||
make \ | ||
# Ubuntu has multiple kernel versions that may be using different gcc versions: use the dkms package to install them all | ||
$(apt-get install -s dkms | awk '/^Inst gcc/{print $2}') \ | ||
patch \ | ||
elfutils \ | ||
curl && \ | ||
apt-get clean | ||
|
||
ARG DRBD_VERSION | ||
RUN wget https://pkg.linbit.com/downloads/drbd/9/drbd-${DRBD_VERSION}.tar.gz -O /drbd.tar.gz && \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
FROM ubuntu:focal | ||
MAINTAINER Roland Kammerer <[email protected]> | ||
|
||
RUN apt-get update && apt-get upgrade -y && apt-get install -y kmod gnupg wget make gcc patch elfutils curl && apt-get clean | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install --no-install-recommends -y \ | ||
ca-certificates \ | ||
kmod \ | ||
gnupg \ | ||
wget \ | ||
make \ | ||
# Ubuntu has multiple kernel versions that may be using different gcc versions: use the dkms package to install them all | ||
$(apt-get install -s dkms | awk '/^Inst gcc/{print $2}') \ | ||
patch \ | ||
elfutils \ | ||
curl && \ | ||
apt-get clean | ||
|
||
ARG DRBD_VERSION | ||
RUN wget https://pkg.linbit.com/downloads/drbd/9/drbd-${DRBD_VERSION}.tar.gz -O /drbd.tar.gz && \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters