-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (21 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
25 lines (21 loc) · 1.04 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
FROM rust:latest AS builder
# Copy sources inside the builder container
WORKDIR /usr/src
COPY kanash-ratzilla/ kanash-ratzilla/
COPY kanash-components/ kanash-components/
COPY kanash/ kanash/
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
RUN cargo binstall -y trunk
RUN rustup target add wasm32-unknown-unknown
RUN rustup target add x86_64-unknown-linux-musl
RUN cd kanash-ratzilla && trunk build
RUN cd kanash && cargo build --target x86_64-unknown-linux-musl
FROM nginx:alpine
COPY --from=builder /usr/src/kanash-ratzilla/dist /usr/share/nginx/html
COPY --from=builder /usr/src/kanash/target/x86_64-unknown-linux-musl/debug/kanash /usr/bin
# LABEL \
# org.opencontainers.image.title="kanash" \
# org.opencontainers.image.description="learn kana in a terminal" \
# org.opencontainers.image.authors="Benoit Leroux" \
# org.opencontainers.image.licenses="MIT" \
# org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \