-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexeDocker.bat
28 lines (24 loc) · 878 Bytes
/
exeDocker.bat
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
:: set docker settings
SET DOCKER_USER=oislen
SET DOCKER_REPO=irishclimatedashboard
SET DOCKER_TAG=latest
SET DOCKER_IMAGE=%DOCKER_USER%/%DOCKER_REPO%:%DOCKER_TAG%
SET DOCKER_CONTAINER_NAME=icd
SET GIT_BRANCH=v0.0.0
:: remove existing docker containers and images
docker image rm -f %DOCKER_IMAGE%
:: build docker image
call docker build --no-cache -t %DOCKER_IMAGE% . --build-arg GIT_BRANCH=%GIT_BRANCH%
::call docker build -t %DOCKER_IMAGE% .
:: run docker container
SET UBUNTU_DIR=/home/ubuntu
call docker run --name %DOCKER_CONTAINER_NAME% --memory 6GB --shm-size=512m -p 5006:5006 --rm %DOCKER_IMAGE%
:: useful docker commands
:: docker images
:: docker ps -a
:: docker exec -it {container_hash} /bin/bash
:: docker stop {container_hash}
:: docker start -ai {container_hash}
:: docker rm {container_hash}
:: docker image rm {docker_image}
:: docker push {docker_image}