Skip to content

MatanelGordon/rust-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-node

A rust image with built-in nodejs for various purposes.

WARNING: This is not a image to serve projects with! Consider it as a builder image. use multi-stage builds as stated below.

Features

  • node v22
  • npm v10
  • built in yarn & pnpm
  • rust 1.83.0
  • bash-sh aliasing for better CLI support for Docker Desktop

Use Cases

  • To build a rust projects involved with node momorepos
  • To build web-assembly projects

NOTE: This image is only for building stage, Do not use this as final image in dockerfiles.

Usage

To diploy a node site based on rust packages

FROM 15012002/rust-node as builder
WORKDIR /usr/app
copy . .
RUN cargo update && npm install
RUN cargo build && npm run build


FROM nginx:latest
COPY --from=builder /usr/app/dist /usr/share/nginx/html

NOTE: The Dockerfile above wont work yet it sets a fair demonstration of how it should be used.

handling CLI

This image comes with bash support out-of-the box. Just click the CLI button in your docker desktop or via the command line:

 docker exec -it mycontainer sh

Manual Build

Feel free to build this image manually by cloning its github repository

To build the image, make sure you have docker installed and use:

docker build . -t rust-node 

About

A rust Docker image with built-in nodejs for various purposes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published