forked from InQuicker/ktmpl
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add files for building a Docker image.
- Loading branch information
1 parent
da7b1ad
commit e0ad7d5
Showing
3 changed files
with
37 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,16 @@ | ||
.dockerignore | ||
Cargo.lock | ||
Cargo.toml | ||
Dockerfile | ||
LICENSE | ||
Makefile | ||
README.md | ||
example.yml | ||
src | ||
target/debug | ||
target/release | ||
target/x86_64-unknown-linux-gnu/debug | ||
target/x86_64-unknown-linux-gnu/release/build | ||
target/x86_64-unknown-linux-gnu/release/deps | ||
target/x86_64-unknown-linux-gnu/release/examples | ||
target/x86_64-unknown-linux-gnu/release/native |
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,6 @@ | ||
FROM scratch | ||
|
||
ENTRYPOINT ["/ktmpl"] | ||
|
||
COPY target/x86_64-unknown-linux-musl/release/ktmpl /ktmpl | ||
|
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,15 @@ | ||
all: cargo-build docker-build | ||
|
||
cargo-build: | ||
docker run \ | ||
--rm \ | ||
-v ${PWD}:/volume \ | ||
-v ${HOME}/.cargo/git:/root/.cargo/git \ | ||
-v ${HOME}/.cargo/registry:/root/.cargo/registry \ | ||
-w /volume \ | ||
-t \ | ||
clux/muslrust \ | ||
cargo build --release | ||
|
||
docker-build: | ||
docker build -t inquicker/ktmpl . |