michiel / docker-rust-microservice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-rust-microservice

Prerequisites

Build

Alpine Linux uses musl-libc instead of glibc, which is the default for most common distributions.

rustup target add x86_64-unknown-linux-musl

Once that is installed we can explicitly target it when building the service,

cargo build --target x86_64-unknown-linux-musl --release 

Running

 docker run -it echo-rs -p 4001:4000

Troubleshooting

docker run -it echo-rs -p 4001:4000 /bin/sh

About


Languages

Language:Rust 89.7%Language:Shell 10.3%