Retro68/Dockerfile
Mark Cave-Ayland d8e2780f8d Dockerfile: add toolchain bin directory to the default PATH
This allows the Retro68 compilers to be executed regardless of the current
working directory which is set to /root by default.
2023-12-16 12:59:53 +01:00

28 lines
612 B
Docker

# vim:ft=dockerfile
# Base image
FROM ubuntu:20.04 AS base
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
cmake libgmp-dev libmpfr-dev libmpc-dev \
libboost-all-dev bison texinfo \
ruby flex curl g++ git
# Add toolchain to default PATH
ENV PATH=/Retro68-build/toolchain/bin:$PATH
WORKDIR /root
# Build image
FROM base AS build
ADD . /Retro68
RUN mkdir /Retro68-build && \
bash -c "cd /Retro68-build && bash /Retro68/build-toolchain.bash"
# Release image
FROM base AS release
COPY --from=build /Retro68-build/toolchain /Retro68-build/toolchain