-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (32 loc) · 1.15 KB
/
Dockerfile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Use a base image with Node.js and Rust installed
FROM rust:latest
FROM node:16
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash \
&& export NVM_DIR="$HOME/.nvm" \
&& [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
&& nvm install 16
ENV NVM_DIR /root/.nvm
ENV NODE_VERSION 16
# Install Node.js and npm
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get update && apt-get install -y nodejs
# Install yarn (if not already installed)
# Set the working directory inside the container
WORKDIR /app
# Copy the entire project directory into the container
COPY . .
# Install Tauri CLI globally
RUN yarn global add @tauri-apps/cli \
yarn global add @tauri-apps/cli-linux-x64-gnu
# Navigate to the Tauri project directory and install dependencies
WORKDIR /app/src-tauri/src
RUN rm -f package-lock.json
RUN yarn cache clean --force
#Installing other dependencies
RUN yarn global add @tauri-apps/api
# Set the working directory back to the root of your project
WORKDIR /app
# Expose necessary ports if required
# EXPOSE <port>
# Set the startup command for the container
CMD ["yarn", "tauri", "dev"]