docker compat
This commit is contained in:
parent
6a41d9c956
commit
0928a24ec1
@ -2,4 +2,5 @@ target
|
||||
.git
|
||||
.dockerignore
|
||||
.gitignore
|
||||
docker-compose.yml
|
||||
Dockerfile
|
||||
|
@ -1,4 +1,7 @@
|
||||
FROM rust:1.76
|
||||
WORKDIR /code
|
||||
COPY . .
|
||||
RUN cargo build --release
|
||||
CMD ["cargo", "run", "--release"]
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=./target \
|
||||
cargo build --release && cp target/release/protohacke-rs /bin/protohacke-rs
|
||||
CMD ["/bin/protohacke-rs"]
|
||||
|
7
docker-compose.yml
Normal file
7
docker-compose.yml
Normal file
@ -0,0 +1,7 @@
|
||||
services:
|
||||
protohacke-rs:
|
||||
build: .
|
||||
ports:
|
||||
- "42042:42042/tcp"
|
||||
tty: true
|
||||
stop_signal: SIGKILL
|
@ -81,7 +81,7 @@ impl Sink<Vec<u8>> for Forward {
|
||||
|
||||
fn main() -> miette::Result<()> {
|
||||
smol::block_on(async {
|
||||
smol::net::TcpListener::bind("localhost:42042")
|
||||
smol::net::TcpListener::bind("0.0.0.0:42042")
|
||||
.await
|
||||
.into_diagnostic()?
|
||||
.incoming()
|
||||
|
Loading…
Reference in New Issue
Block a user