From b385c05be4ac93c0418c0ec11106d97b6fe3c6cc Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 16 Nov 2024 00:49:07 -0800 Subject: [PATCH] dockerizing --- Dockerfile | 11 ++++++++--- __about_these_files.md | 5 +++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index b3385bd..33283b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,16 @@ ARG NODE_VERSION=23.0.0 FROM node:${NODE_VERSION}-alpine -# Install Rust and Dioxus CLI for running `dx` commands -RUN apk add --no-cache curl gcc musl-dev && \ +# Install Rust, Dioxus CLI, and required dependencies (including make and Perl for building OpenSSL) +RUN apk add --no-cache curl gcc musl-dev perl make && \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ source $HOME/.cargo/env && \ - cargo install dioxus-cli + echo 'source $HOME/.cargo/env' >> /etc/profile && \ + cargo install dioxus-cli && \ + chmod +x /root/.cargo/bin/dx # Ensure dx has execute permissions + +# Add Cargo to PATH for future commands +ENV PATH="/root/.cargo/bin:${PATH}" # Use production node environment by default ENV NODE_ENV=production diff --git a/__about_these_files.md b/__about_these_files.md index a0847b8..a5abff2 100644 --- a/__about_these_files.md +++ b/__about_these_files.md @@ -8,9 +8,10 @@ IF RUNNING VIA DOCKER: 2) With -t githubio-app assigns the name githubio-app to the image and specifies the current directory (where the Dockerfile is located) as the build context: - docker build -t githubio-app . + docker build --no-cache -t githubio-app . 3) Then with the following command start a container using this named image: - docker run -p 8080:8080 githubio-app + docker run -p 8080:8080 githubio-app +