-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-local.sh
More file actions
executable file
·33 lines (28 loc) · 861 Bytes
/
run-local.sh
File metadata and controls
executable file
·33 lines (28 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
cd `dirname $0`
if type "sbt" > /dev/null 2>&1; then
sbt fullCompile
else
docker build \
--build-arg BASE_IMAGE_TAG="8u212-b04-jdk-stretch" \
--build-arg SBT_VERSION="1.3.10" \
--build-arg SCALA_VERSION="2.12.8" \
--build-arg USER_ID=1001 \
--build-arg GROUP_ID=1001 \
-t hseeberger/scala-sbt:8u222_1.3.10_2.12.8 \
github.com/hseeberger/scala-sbt.git#:debian
docker run \
--rm -v /var/run/docker.sock:/var/run/docker.sock \
-v "$PWD:/$PWD" -w="/$PWD" \
hseeberger/scala-sbt:8u222_1.3.10_2.12.8 \
sbt fullCompile
fi
if type "docker-compose" > /dev/null 2>&1; then
docker-compose -f docker-compose-local.yaml up --build -d
else
docker run \
--rm -v /var/run/docker.sock:/var/run/docker.sock \
-v "$PWD:/$PWD" -w="/$PWD" \
docker/compose:1.22.0 \
-f docker-compose-local.yaml up --build -d
fi