1
Fork 0
hare-playground/Dockerfile

49 lines
1.1 KiB
Docker

FROM ubuntu:24.04 as harebuild
RUN apt-get update -qq \
&& apt-get install -qy --no-install-recommends \
build-essential \
git \
scdoc \
ca-certificates \
wget
RUN wget https://c9x.me/compile/release/qbe-1.2.tar.xz && \
tar -xf qbe-1.2.tar.xz && \
cd qbe-1.2 && \
make && \
make install
RUN git clone https://git.sr.ht/~sircmpwn/harec && \
cd harec && \
cp configs/linux.mk config.mk && \
make && \
make install
RUN git clone https://git.sr.ht/~sircmpwn/hare && \
cd hare && \
cp configs/linux.mk config.mk && \
make && \
make install
WORKDIR /src
COPY ./ ./
RUN make -B playground HAREPATH=/usr/local/src/hare/stdlib HAREFLAGS=-lpthread
FROM ubuntu:24.04
RUN apt-get update -qq \
&& apt-get install -qy --no-install-recommends \
ca-certificates \
tzdata \
bubblewrap \
binutils \
vim
COPY --from=harebuild /usr/local /usr/local
COPY --from=harebuild /src/playground /usr/local/bin/playground
COPY ./frontend/ /app/
WORKDIR /app
ENTRYPOINT ["/usr/local/bin/playground", "-a", "0.0.0.0:8080"]