Skip to content

Commit

Permalink
dockerizing
Browse files Browse the repository at this point in the history
  • Loading branch information
oceanbluesky committed Nov 16, 2024
1 parent 752709e commit b385c05
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions __about_these_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -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




Expand Down

0 comments on commit b385c05

Please sign in to comment.