Skip to content

Jkutkut/Docker4Rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker4Rust:

This repository contains the logic needed to compile and run Rust code in a Docker container. This way, you can run Rust code on any machine without having to install any tools.

Usage:

Run directly:

  • Go to the directory where your Rust code is located.
docker run -it --rm -v $(pwd):/app -w /app jkutkut/docker4rust

Create a release image:

  • Take the code from the release dockerfile and edit it to your needs in the root of your project.

  • Build the image (XXXXX is the name of your image):

docker build -t XXXXX .

Note 01: In order to save space, a temporally image is created to build and another is created to run the code.

Note 02: The Dockerfile copies all the project to the image. If you don't need all the files, you can add a .dockerignore file to the root of your project to ignore some files.

Version log:

  • v1.1.0:
    • cargo watch
  • v1.0.0:
    • cargo

About

Docker container to compile and run Rust programs

Resources

License

Stars

Watchers

Forks