2017-10-01 21:36:50 +00:00
|
|
|
# vim:ft=dockerfile
|
2018-08-15 02:02:47 +00:00
|
|
|
|
2022-10-17 20:08:12 +00:00
|
|
|
# Base image
|
|
|
|
FROM ubuntu:20.04 AS base
|
2017-10-01 21:36:50 +00:00
|
|
|
|
2022-10-17 13:29:05 +00:00
|
|
|
RUN apt-get update && \
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
|
|
cmake libgmp-dev libmpfr-dev libmpc-dev \
|
|
|
|
libboost-all-dev bison texinfo \
|
2023-11-09 21:07:21 +00:00
|
|
|
ruby flex curl g++ git macutils
|
2017-10-01 21:36:50 +00:00
|
|
|
|
2022-10-17 21:26:58 +00:00
|
|
|
# Add toolchain to default PATH
|
|
|
|
ENV PATH=/Retro68-build/toolchain/bin:$PATH
|
|
|
|
WORKDIR /root
|
|
|
|
|
2022-10-17 20:08:12 +00:00
|
|
|
# Build image
|
|
|
|
FROM base AS build
|
|
|
|
|
2018-08-15 02:02:47 +00:00
|
|
|
ADD . /Retro68
|
|
|
|
|
2022-10-17 20:08:12 +00:00
|
|
|
RUN mkdir /Retro68-build && \
|
2023-11-09 21:07:21 +00:00
|
|
|
mkdir /Retro68-build/bin && \
|
2022-10-17 20:08:12 +00:00
|
|
|
bash -c "cd /Retro68-build && bash /Retro68/build-toolchain.bash"
|
|
|
|
|
|
|
|
# Release image
|
|
|
|
FROM base AS release
|
2017-10-01 21:36:50 +00:00
|
|
|
|
2023-11-11 11:45:08 +00:00
|
|
|
ENV INTERFACES=multiversal
|
|
|
|
|
2023-11-09 21:07:21 +00:00
|
|
|
COPY --from=build \
|
|
|
|
/Retro68/interfaces-and-libraries.sh \
|
|
|
|
/Retro68/prepare-headers.sh \
|
|
|
|
/Retro68/prepare-rincludes.sh \
|
2023-11-11 11:45:08 +00:00
|
|
|
/Retro68/install-universal-interfaces.sh \
|
|
|
|
/Retro68/docker-entrypoint.sh \
|
2023-11-09 21:07:21 +00:00
|
|
|
/Retro68-build/bin/
|
|
|
|
|
2022-10-17 20:08:12 +00:00
|
|
|
COPY --from=build /Retro68-build/toolchain /Retro68-build/toolchain
|
2023-12-16 15:19:01 +00:00
|
|
|
|
2023-12-16 21:49:02 +00:00
|
|
|
LABEL org.opencontainers.image.source https://github.com/autc04/Retro68
|
2023-11-11 11:45:08 +00:00
|
|
|
|
|
|
|
CMD [ "/bin/bash" ]
|
|
|
|
ENTRYPOINT [ "/Retro68-build/bin/docker-entrypoint.sh" ]
|