-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 1.15 KB
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 1.15 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
FROM node:latest
WORKDIR /app
COPY package* /app/
RUN npm install
RUN curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN curl --proto '=https' --tlsv1.3 https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf -sSf | sh -s -- -y
RUN rustup toolchain install nightly-2023-09-23
RUN rustup component add rust-src --toolchain nightly-2023-09-23-x86_64-unknown-linux-gnu
COPY . /app
RUN wasm-pack build --target web /app/src/experiments/genetics_rust/wasm
RUN npm run build
# RUN curl -s https://api.github.com/repos/dorian-K/gamejam-2026/releases/latest | grep "browser_download_url" | grep "upload.zip" | cut -d '"' -f 4 | xargs curl -L -o upload.zip
RUN apt-get update && apt-get install -y jq unzip curl
RUN curl -s https://api.github.com/repos/dorian-K/gamejam-2026/releases/latest | jq -r '.assets[] | select(.name | contains("upload.zip")) | .browser_download_url' \
| xargs curl -L -o upload.zip
RUN unzip upload.zip -d /app/dist/gamejam-2026
FROM alpine:latest
COPY --from=0 /app/dist/ /build
# copy the build artifacts to /out at runtime and set permissions
CMD cp -r /build/* /out && chmod -R 755 /out