Skip to content

Commit

Permalink
Add files for building a Docker image.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmycuadra committed May 11, 2016
1 parent da7b1ad commit e0ad7d5
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .dockerignore
@@ -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
6 changes: 6 additions & 0 deletions Dockerfile
@@ -0,0 +1,6 @@
FROM scratch

ENTRYPOINT ["/ktmpl"]

COPY target/x86_64-unknown-linux-musl/release/ktmpl /ktmpl

15 changes: 15 additions & 0 deletions Makefile
@@ -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 .

0 comments on commit e0ad7d5

Please sign in to comment.