Create docker image for release
This commit is contained in:
parent
f2ec85b46f
commit
4501be6a43
6
rust/Dockerfile
Normal file
6
rust/Dockerfile
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
FROM debian:bullseye-slim
|
||||||
|
|
||||||
|
COPY sea_battle_backend /usr/local/bin/sea_battle_backend
|
||||||
|
|
||||||
|
ENTRYPOINT /usr/local/bin/sea_battle_backend
|
||||||
|
|
10
rust/build_docker_image.sh
Executable file
10
rust/build_docker_image.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cargo build --release --bins
|
||||||
|
|
||||||
|
TEMP_DIR=$(mktemp -d)
|
||||||
|
cp target/release/sea_battle_backend "$TEMP_DIR"
|
||||||
|
|
||||||
|
docker build -f Dockerfile "$TEMP_DIR" -t pierre42100/seabattleapi
|
||||||
|
|
||||||
|
rm -r $TEMP_DIR
|
||||||
|
|
Loading…
Reference in New Issue
Block a user