-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# `cannon-rs` Docker | ||
|
||
This folder contains the Dockerfile for the `cannon-rs` binary. | ||
|
||
## Building | ||
|
||
Dependencies: [Docker](https://www.docker.com/) | ||
|
||
```sh | ||
./build.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# Grab the directory of this script. | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
|
||
echo "Building binary..." | ||
cargo build --release --bin cannon | ||
|
||
# Check if `docker` is installed | ||
if ! command -v docker &> /dev/null | ||
then | ||
echo "Error: docker not found. Please install docker and try again." | ||
exit | ||
fi | ||
|
||
echo "Building image..." | ||
docker build -f cannon-rs.dockerfile $DIR/.. -t cannon-rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM alpine:3.14 | ||
|
||
COPY target/release/cannon /usr/local/bin |