Skip to content

mikesparr/tutorial-rust-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust App In Docker

This repo is a simple example of how to package a Rust app in a Docker container and support ENV variables (like 12-factor app)

Requirements

  • Docker environment and familiarity with command lines

Setup

  • Clone this repo and cd tutorial-rust-docker

Build

docker build -t my-rust-app .

Run (without ENV)

docker run --rm --name rusty my-rust-app

  • prints Hello World

Run (with ENV)

docker run --rm -e RUST_DOCKER_NAME="Foo" --name rusty my-rust-app

  • prints Hello, Foo

About

Simple Hello World app in Rust run in Docker container

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages