cargo-rocket-docker-1.0.0 is not a library.
Cargo Rocket Docker
Automate tool sub-command to create a docker image for Rocket Project and build/publish them using Alpine OS.
References
- https://crates.io/crates/cargo-rocket-docker
- https://github.com/Gary-Ascuy/cargo-rocket-docker
- https://github.com/Gary-Ascuy/rust-rest-api
- https://hub.docker.com/repository/docker/garyascuy/cargo-rocket-example
Docker Image - Tested in MachOS
Setup
- Rust Nightly Version
- Docker Latest
To upgrade:
Usage
Add following section into Cargo.toml file
[]
= "app-bin-name"
= "0.1.0"
= "Team Name <mail.support@company.com>"
= "./.tmp_docker"
= "garyascuy/cargo-rocket-example"
Build Docker Images
Push Docker Images
All-In-One Command? Type following command:
All-In-One Command still long? Here more alternatives:
Do you need some custom? Create files and maintaing by yourself ಠ_ಠ:
I don't understand? Learn by Example:
Rust Rest API Basic API with Rocket in Rust
There's a lot more you can do! Here's a copy of the help:
Config Properties
Here Full Example && Custom Tags && Alpine Packages
[]
= "app-bin-name"
= "0.1.0"
= "Team Name <mail.support@company.com>"
= "./.tmp_docker"
= "garyascuy/cargo-rocket-example"
= [
"registry.gitlab.com/garyascuy:latest",
"registry.gitlab.com/garyascuy:1.0.0",
]
[]
= "acf-openssl"
= "imagemagick second-pkg other-pkg"
Descriptions
# Cargo Docker Settings
[]
# docker will copy bin from target/release/{app-bin-name}
= "app-bin-name"
# Docker image version
= "1.0.0"
# Responsible for image
= "Team Name <mail@company.com>"
# Docker tag base, it will create tho images:
# account/back:{version} and account/back:latest
= "account/back"
# docker build will use these spesific tags to create the images and publish
= [
"garyascuy/server:1.0.0",
"garyascuy/server:latest",
]
# Optional install extra packages in Alpine OS
[]
# apk add acf-openssl in build image, development dependencies
= "acf-openssl"
# add packages in final image, production dependencies
= "imagemagick second-pkg other-pkg"
About
Created by Gary Ascuy and Follow me in LinkedIn or GitHub if you want :P.