haiku/3rdparty/docker/cross-compiler/Dockerfile
Niels Sascha Reedijk 52c4471a30 Docker: update cross-compiler Dockerfile and build script
Updated so that it can build Haiku R1 Beta 4. The intention is to use this to
create repeatable builds for Rust builds. The script has been tweaked to use
the latest stable debian as base image, to include the (now-required)
libzstd-devel package, and the g++-multilib package to support building 32 bit
in a 64 bit host. It also moves to python 3.x.

Additionally, the image now supports specifying custom git tags/branches for
the buildtools and Haiku itself, so that specific hrevs or branches can be
built

Change-Id: Ia43089ff7271256fdb6603bd4400ee3b9228ea1b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5965
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-12-30 07:55:18 +00:00

47 lines
922 B
Docker

FROM debian:bullseye-slim
# docker build --no-cache --tag docker.io/haiku/cross-compiler:x86_64 .
# docker push docker.io/haiku/cross-compiler:x86_64
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bison \
bzip2 \
ca-certificates \
cmake \
curl \
file \
flex \
g++ \
g++-multilib \
gawk \
git \
libcurl4-openssl-dev \
libssl-dev \
libzstd-dev \
make \
nasm \
ninja-build \
python3 \
texinfo \
vim \
wget \
xz-utils \
zlib1g-dev
# source revision to build
ARG BUILDTOOLS_REV=master
ARG HAIKU_REV=master
# architectures to build
ARG ARCHITECTURE=x86_64
ARG SECONDARY_ARCHITECTURE=
# Build Haiku cross-compiler toolchain, and haiku package tool
WORKDIR /tmp
COPY build-toolchain.sh /tmp/
RUN chmod 755 /tmp/build-toolchain.sh
RUN /tmp/build-toolchain.sh $BUILDTOOLS_REV $HAIKU_REV $ARCHITECTURE $SECONDARY_ARCHITECTURE
WORKDIR /