Example Image / Automate tool sub-command to create a docker image for Rocket Project
229
Automate tool sub-command to create a docker image for Rocket Project and build/publish them using Alpine OS.
$ cargo install cargo-rocket-docker
# Clone Test Repository
$ git clone https://github.com/Gary-Ascuy/rust-rest-api.git
$ cd rust-rest-api
# Now update `Cargo.toml` docker.tag with your Dockerhub account.
# Basic Commands
$ cargo docker --build
$ cargo docker --push
# All-In-One Commands
$ cargo docker --build --push
$ cargo docker --all
# Eject Dockerfile && .dockerignore files
$ cargo docker --eject
$ docker run -d -p 3666:3666 garyascuy/cargo-rocket-example
And go to the browser ...
open http://localhost:3666
open http://localhost:3666/home
garyascuy/cargo-rocket-example:1.0.0
OS/ARCH: linux/amd64
SIZE: 4.31 MB
LAST PUSHED: 12 minutes ago by garyascuy
Created by Gary Ascuy and Follow me in LinkedIn or GitHub if you want :P.
Content type
Image
Digest
Size
4.3 MB
Last updated
over 6 years ago
docker pull garyascuy/cargo-rocket-example