Sign inSign up

garyascuy/cargo-rocket-example

By garyascuy

•Updated over 6 years ago

Example Image / Automate tool sub-command to create a docker image for Rocket Project

Image
0

229

garyascuy/cargo-rocket-example repository overview

⁠Cargo Rocket Docker

Automate tool sub-command to create a docker image for Rocket Project and build/publish them using Alpine OS.

⁠References

⁠Setup

  • Rust Nightly Version
  • Docker Latest
$ cargo install cargo-rocket-docker

⁠I want to do my self

# 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

⁠Run ?

$ docker run -d -p 3666:3666 garyascuy/cargo-rocket-example

And go to the browser ...

open http://localhost:3666
open http://localhost:3666/home

⁠Docker Image

garyascuy/cargo-rocket-example:1.0.0
OS/ARCH: linux/amd64
SIZE: 4.31 MB
LAST PUSHED: 12 minutes ago by garyascuy

⁠About

Created by Gary Ascuy⁠ and Follow me in LinkedIn⁠ or GitHub⁠ if you want :P.

Tag summary

Content type

Image

Digest

Size

4.3 MB

Last updated

over 6 years ago

docker pull garyascuy/cargo-rocket-example