forth-riscv

My forth
git clone git://git.electrosoup.com/forth-riscv
Log | Files | Refs

Dockerfile (1140B)


      1 FROM debian:stable-slim AS build-toolchain
      2 
      3 RUN apt-get update && apt-get -y upgrade && \
      4     apt-get --no-install-recommends -y install \
      5         autoconf \
      6         automake \
      7         autotools-dev \
      8         curl \
      9         python3 \
     10         python3-pip \
     11         libmpc-dev \
     12         libmpfr-dev \
     13         libgmp-dev \
     14         gawk \
     15         build-essential \
     16         bison \
     17         flex \
     18         texinfo \
     19         gperf \
     20         libtool \
     21         patchutils \
     22         bc \
     23         zlib1g-dev \
     24         libexpat-dev \
     25         ninja-build \
     26         git \
     27         cmake \
     28         libglib2.0-dev \
     29         libslirp-dev
     30 
     31 RUN git clone https://github.com/riscv/riscv-gnu-toolchain
     32 
     33 WORKDIR "/riscv-gnu-toolchain"
     34 RUN ./configure --prefix=/opt/riscv
     35 RUN make
     36 WORKDIR "/"
     37 
     38 FROM build-toolchain AS install-tools
     39 
     40 RUN apt-get update && apt-get -y upgrade && \
     41     apt-get --no-install-recommends -y install \
     42         qemu-system-misc \
     43         qemu-utils
     44 
     45 FROM install-tools AS build
     46 
     47 ENV PATH="$PATH:/opt/riscv/bin"
     48 WORKDIR "/forth-riscv"
     49 COPY Makefile .
     50 COPY src src/
     51 COPY disk0.qcow[2] .
     52 RUN make
     53 
     54 FROM build AS run
     55 
     56 COPY run .
     57 CMD ["./run"]