diff --git a/Dockerfile b/Dockerfile index 2acc1e6e0b..ffe7550605 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ # vim:ft=dockerfile -FROM ubuntu:20.04 +# Base image +FROM ubuntu:20.04 AS base RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y \ @@ -8,8 +9,15 @@ RUN apt-get update && \ libboost-all-dev bison texinfo \ ruby flex curl g++ +# Build image +FROM base AS build + ADD . /Retro68 -RUN mkdir /Retro68-build +RUN mkdir /Retro68-build && \ + bash -c "cd /Retro68-build && bash /Retro68/build-toolchain.bash" -RUN bash -c "cd /Retro68-build && bash /Retro68/build-toolchain.bash --clean-after-build" +# Release image +FROM base AS release + +COPY --from=build /Retro68-build/toolchain /Retro68-build/toolchain