forked from ScratchEverywhere/ScratchEverywhere
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.linux
More file actions
33 lines (18 loc) · 1.22 KB
/
Copy pathDockerfile.linux
File metadata and controls
33 lines (18 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM gcc:14 AS curl_builder
ARG CURL_VERSION=8.7.1
RUN wget https://curl.se/download/curl-${CURL_VERSION}.tar.gz && tar xf curl-${CURL_VERSION}.tar.gz && cd curl-${CURL_VERSION} && ./configure --prefix='/usr/local' --enable-websockets --with-openssl --enable-static && make && make install
FROM gcc:14 AS mistpp_builder
COPY --from=curl_builder /usr/local /usr/local
WORKDIR /mistpp
RUN apt-get update && apt-get install -y --no-install-recommends cmake
RUN git clone https://github.com/ScratchEverywhere/mistpp . && mkdir build && cd build && PKG_CONFIG_PATH=/usr/local/lib/pkgconfig cmake .. -DCMAKE_BUILD_TYPE=Release && make && make install
FROM gcc:14 AS main_builder
WORKDIR /app
COPY --from=mistpp_builder /usr/local/lib/libmist++.a /usr/local/lib/libmist++.a
COPY --from=mistpp_builder /usr/local/include /usr/local/include
COPY --from=mistpp_builder /usr/local/lib/pkgconfig/mist++.pc /usr/local/lib/pkgconfig/mist++.pc
RUN apt-get update && apt-get install -y --no-install-recommends build-essential libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev
COPY . .
RUN make PLATFORM=pc release ENABLE_CLOUDVARS=1 ENABLE_AUDIO=1
FROM scratch AS exporter
COPY --from=main_builder /app/build/pc/release/Scratch-pc /