diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2025-10-24 14:50:52 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2025-10-24 14:50:52 +0200 |
| commit | 552a0482af54cd856f14c8fa138fff63d4e0b926 (patch) | |
| tree | 98a8961e8a765bff86d9798d80aa574189859fef /Containerfile | |
| parent | 94d007b7bda07f0aa97ed5ae5e1b64bb8d6576f0 (diff) | |
| download | teachos-toolchain-552a0482af54cd856f14c8fa138fff63d4e0b926.tar.xz teachos-toolchain-552a0482af54cd856f14c8fa138fff63d4e0b926.zip | |
toolchain: switch to semi-static toolchain
Diffstat (limited to 'Containerfile')
| -rw-r--r-- | Containerfile | 62 |
1 files changed, 27 insertions, 35 deletions
diff --git a/Containerfile b/Containerfile index e840311..8add7ce 100644 --- a/Containerfile +++ b/Containerfile @@ -1,4 +1,4 @@ -FROM docker.io/archlinux:latest AS build +FROM ubuntu:latest AS builder ARG BINUTILS_VERSION ARG GCC_VERSION @@ -6,48 +6,40 @@ ARG GDB_VERSION ARG NEWLIB_VERSION ARG TARGET +ARG ZLIB_VERSION +ARG NCURSES_VERSION +ARG EXPAT_VERSION +ARG READLINE_VERSION +ARG GMP_VERSION +ARG MPFR_VERSION +ARG MPC_VERSION + +ENV STATIC_DEPS_PREFIX=/opt/static-deps + ADD ./patches /patches ADD ./scripts /scripts RUN /scripts/0000-prepare-os.sh RUN /scripts/0100-download.sh +RUN /scripts/0150-build-static-deps.sh RUN /scripts/0200-build-target-binutils.sh RUN /scripts/0300-build-bootstrap-gcc.sh RUN /scripts/0400-build-target-newlib.sh RUN /scripts/0500-build-target-gcc.sh RUN /scripts/0600-build-target-gdb.sh -FROM docker.io/archlinux:latest - -ARG EMULATOR=x86 - -RUN useradd -m dev - -COPY --from=build /opt/toolchain /opt/toolchain - -ENV PATH=/opt/toolchain/bin:$PATH - -RUN pacman --noconfirm -Syu && \ - pacman --noconfirm --needed -S \ - cmake \ - doxygen \ - flex \ - git \ - gmp \ - grub \ - guile \ - libelf \ - libisl \ - libisoburn \ - libmpc \ - mpfr \ - mtools \ - ninja \ - openssh \ - qemu-system-$EMULATOR \ - qemu-ui-curses \ - which \ - xxhash \ - zlib - -RUN rm -rf /var/cache/pacman +FROM ubuntu:latest + +LABEL org.opencontainers.image.title="TeachOS Toolchain" +LABEL org.opencontainers.image.description="A semi-statically linked cross-compiler toolchain for TeachOS development." + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + libstdc++6 && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=builder /opt/toolchain /opt/toolchain + +ENV PATH="/opt/toolchain/bin:${PATH}" + +CMD [ "/bin/bash" ] |
