blob: dd4bc06b6938f1933691ac7077ad13105c0f368e (
plain)
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
|
FROM ubuntu:resolute AS builder
ARG IMAGE_BUILD
ARG BINUTILS_VERSION
ARG GCC_VERSION
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
ARG PYTHON_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 ubuntu:resolute
LABEL org.opencontainers.image.title="TeachOS Toolchain"
LABEL org.opencontainers.image.description="A semi-statically linked cross-compiler toolchain for TeachOS development."
LABEL org.opencontainers.iamge.source="https://gitlab.ost.ch/teachos/devcontainers"
LABEL org.opencontainers.image.version="$GCC_VERSION"
LABEL org.opencontainers.iamge.revision="$IMAGE_BUILD"
LABEL org.opencontainers.image.base.name="docker.io/ubuntu:questing"
ARG PYTHON_VERSION
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libstdc++6 python$PYTHON_VERSION-dev && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /opt/toolchain /opt/toolchain
ENV PATH="/opt/toolchain/bin:${PATH}"
CMD [ "/bin/bash" ]
|