An extremely simple Rust/Rocket HTTP server available on Docker Hub.
Clone the project, cd
into it, and build using cargo
.
git clone https://github.com/Proxxa/rocket-hello-world.git
cd rocket-hello-world
cargo build [-r]
The executable will be in target/debug
or target/release
depending on whether you include -r
.
There are two Dockerfiles provided with the project: Alpine and Busybox.
Clone the project, cd
into it, and build using one of the following commands:
docker build -t rocket-hello-world -f docker/Alpine
docker build -t rocket-hello-world -f docker/Busybox
Busybox will generate a slightly smaller docker image than Alpine, but the difference is negligible.
If you've built the executable, simply cd
to its location and run it as you would any other file. On most linux systems, this would be ./rocket-hello-world
.
Similar to building,
git clone https://github.com/Proxxa/rocket-hello-world.git
cd rocket-hello-world
cargo run [-r]
There is an image available on Docker Hub. You can run it with the following command:
docker run proxxa/rocket-hello-world
- Clone the project
cd
into the folder- Build the desired docker file (
docker/Alpine
ordocker/Busybox
) - Run the local image.
git clone https://github.com/Proxxa/rocket-hello-world.git
cd rocket-hello-world
docker build -t rocket-hello-world -f docker/Busybox
docker run rocket-hello-world --name rocket-hello-world