-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from Dushyantbha012/main
Containerizing the Frontend with Docker and Updating Documentation
- Loading branch information
Showing
3 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Use Ubuntu 22.04 as the base image | ||
FROM ubuntu:22.04 | ||
|
||
# Install dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
curl \ | ||
build-essential \ | ||
libgtk-3-dev \ | ||
libwebkit2gtk-4.0-dev \ | ||
libappindicator3-dev \ | ||
wget \ | ||
xz-utils \ | ||
libssl-dev \ | ||
libglib2.0-dev \ | ||
libgirepository1.0-dev \ | ||
pkg-config \ | ||
software-properties-common \ | ||
libjavascriptcoregtk-4.0-dev \ | ||
libjavascriptcoregtk-4.1-dev \ | ||
libsoup-3.0-dev \ | ||
libwebkit2gtk-4.1-dev \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Node.js (Node.js 16 is compatible with Tauri) | ||
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \ | ||
apt-get install -y nodejs | ||
|
||
# Install Rust | ||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
|
||
# Install Tauri CLI | ||
RUN npm install -g @tauri-apps/cli | ||
|
||
# Define build arguments | ||
ARG TAURI_SIGNING_PRIVATE_KEY | ||
ARG TAURI_SIGNING_PRIVATE_KEY_PASSWORD | ||
|
||
# Copy the application source code to the container | ||
WORKDIR /app | ||
COPY . . | ||
|
||
# Install dependencies | ||
RUN npm install | ||
|
||
# Set environment variables using build arguments | ||
ENV TAURI_SIGNING_PRIVATE_KEY=$TAURI_SIGNING_PRIVATE_KEY | ||
ENV TAURI_SIGNING_PRIVATE_KEY_PASSWORD=$TAURI_SIGNING_PRIVATE_KEY_PASSWORD | ||
|
||
# Build the frontend (React app) | ||
RUN npm run build | ||
|
||
# Build the Tauri application | ||
RUN npm run tauri build -v | ||
|
||
# Set the container's entrypoint to access the bundled files | ||
CMD ["bash"] |