42 lines
960 B
Docker
Raw Permalink Normal View History

2025-03-17 20:44:11 -04:00
FROM ubuntu
WORKDIR /app
COPY . .
RUN apt-get update && apt-get install -y \
build-essential \
git \
curl \
libwebkit2gtk-4.1-dev \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
python3
# nvm env vars
RUN mkdir -p /usr/local/nvm
ENV NVM_DIR /usr/local/nvm
# IMPORTANT: set the exact version
ENV NODE_VERSION v22.9.0
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm use --delete-prefix $NODE_VERSION"
# add node and npm to the PATH
ENV NODE_PATH $NVM_DIR/versions/node/$NODE_VERSION/bin
ENV PATH $NODE_PATH:$PATH
RUN npm -v
RUN node -v
# Get Rust
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
2025-03-17 21:02:18 -04:00
ENV PATH="/root/.cargo/bin:${PATH}"
2025-03-17 20:44:11 -04:00
# Get tauri
RUN cargo install tauri-cli
2025-03-17 21:18:22 -04:00
# Get trunk
RUN cargo install trunk
2025-03-17 20:44:11 -04:00
# Build app
WORKDIR /app/client
2025-03-21 15:22:56 -04:00
ENTRYPOINT ["cargo", "tauri", "build"]