Browse Source

Added some windows scripts for building and deploying a docker container

develop
Drew Short 6 years ago
parent
commit
ae1fbd1d16
  1. 1
      .gitignore
  2. 11
      docker/build-linux.bat
  3. 8
      docker/run-linux.bat

1
.gitignore

@ -1,4 +1,5 @@
/.idea /.idea
/docker/linux
/target /target
**/*.rs.bk **/*.rs.bk
rsddns.yml rsddns.yml

11
docker/build-linux.bat

@ -0,0 +1,11 @@
if not exist "%cd%\docker\linux\target" mkdir "%cd%\docker\linux\target"
if not exist "%cd%\docker\linux\cargo" mkdir "%cd%\docker\linux\cargo"
docker run --rm ^
-e CARGO_HOME="/tmp/cargo" ^
-v "%cd%":/usr/src/rsddns ^
-v "%cd%\docker\linux\target":/usr/src/rsddns/target ^
-v "%cd%\docker\linux\cargo":/tmp/cargo ^
-w /usr/src/rsddns ^
rust:1.30.1-stretch ^
cargo build --release && strip $/usr/src/rsddns/target/release/rsddns

8
docker/run-linux.bat

@ -0,0 +1,8 @@
copy rsddns.yml "%cd%\docker\linux\target\release\rsddns.yml"
docker run --rm -i -t ^
-p 8080:8080 ^
-v "%cd%\docker\linux\target\release":/opt/rsddns ^
-w /opt/rsddns ^
debian:stretch-slim ^
./rsddns -c ./rsddns.yml -h 0.0.0.0 -p 8080
Loading…
Cancel
Save