1
Fork 0
hare-playground/Dockerfile

49 lines
1.1 KiB
Docker
Raw Normal View History

2024-05-24 21:42:04 +00:00
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 ./ ./
2024-06-01 14:45:25 +00:00
RUN make -B httpd HAREPATH=/usr/local/src/hare/stdlib HAREFLAGS=-lpthread
2024-05-24 21:42:04 +00:00
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
2024-06-01 13:41:13 +00:00
COPY --from=harebuild /src/httpd /usr/local/bin/backend
2024-06-01 14:45:25 +00:00
COPY ./frontend/ /app/
2024-05-24 21:42:04 +00:00
2024-06-01 14:45:25 +00:00
WORKDIR /app
2024-06-01 13:41:13 +00:00
ENTRYPOINT ["/usr/local/bin/backend", "-a", "0.0.0.0:8080"]