forked from AccsoStefanSchubert/Marvin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildAndLaunchContainer.sh
More file actions
executable file
·36 lines (29 loc) · 964 Bytes
/
buildAndLaunchContainer.sh
File metadata and controls
executable file
·36 lines (29 loc) · 964 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
34
35
36
#!/usr/bin/env bash
#
# Copyright (c) 2023 by Stefan Schubert under the MIT License (MIT).
# See project LICENSE file for the detailed terms and conditions.
#
# run Starte das Image (siehe -d unten) als Container!
# -v außen:innen Mounte Verzeichnis
# -p außen:innen Bilde Port ab
# -d detach
# imagename
# -- name container-name Benutze diesen Namen für den Container
echo "copy current jars to container assets."
mkdir -p assets/opt
cp target/marvin-bot-1.1-SNAPSHOT.jar assets/opt
echo "done"
docker rm accsonaut/marvin:latest
echo "removed possible stale container"
docker build -t accsonaut/marvin:latest -f Dockerfile .
echo "create marvins container for you ;-)"
# create a container based on the image above.
# Ports explained
# 8042: http port
# 5701: hazelcast
docker run \
-p 8042:8042 \
-p 5701:5701 \
--name marvin \
-d \
accsonaut/marvin:latest