Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Dockerfile.buildroot
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This layers on top of the primary cosa container, and includes
# the build dependencies for some key packages such as
# ignition, rpm-ostree, libpod, systemd, and kernel. If you want
# another package in this list, submit a PR and we can probably add it.
#
# Further, the entrypoint is reset to bash, and the user to root, making
# this container easier to use generically. For example, the rpm-ostree
# CI system will likely use this as a base image.
FROM quay.io/coreos-assembler/coreos-assembler:latest
USER root
ENTRYPOINT ["/usr/bin/bash"]
WORKDIR /root/containerbuild
COPY src src
RUN ./src/install-buildroot.sh && yum clean all && rm src -rf
WORKDIR /root
9 changes: 9 additions & 0 deletions src/buildroot-buildreqs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is what the CoreOS developers tend to actively develop/own.
# If you want to extend this, feel free to file a PR.
ignition
ostree
rpm-ostree
kernel
systemd
dracut
podman
29 changes: 29 additions & 0 deletions src/buildroot-reqs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This is a list of basic buildrequires; it'd be a bit better to
# yum -y install @buildsys-build but unfortunately that hits a bug:
# https://fedoraproject.org/wiki/Common_F30_bugs#Conflicts_between_fedora-release_packages_when_installing_package_groups
# So here we inline it, minus the -release package.
bash
bzip2
coreutils
cpio
diffutils
findutils
gawk
glibc-minimal-langpack
grep
gzip
info
make
patch
redhat-rpm-config
rpm-build
sed
shadow-utils
tar
unzip
util-linux
which
xz

# Also, add clang since it's useful at least in CI for C/C++ projects
clang
11 changes: 11 additions & 0 deletions src/install-buildroot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# This is invoked by Dockerfile.buildroot
set -euo pipefail
dn=$(dirname "$0")
deps=$(grep -v '^#' "${dn}"/buildroot-reqs.txt)
echo "Installing requirements"
echo "${deps}" | xargs yum -y install
brs=$(grep -v '^#' "${dn}"/buildroot-buildreqs.txt)
echo "Installing build dependencies of primary packages"
echo "${brs}" | xargs yum -y builddep
echo 'Done!'