forked from firstBitMarksistskaya/onec-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-crs.sh
executable file
·34 lines (27 loc) · 853 Bytes
/
build-crs.sh
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
#!/bin/bash
set -e
docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD $DOCKER_USERNAME
if [ $DOCKER_SYSTEM_PRUNE = 'true' ] ; then
docker system prune -af
fi
last_arg='.'
if [ $NO_CACHE = 'true' ] ; then
last_arg='--no-cache .'
fi
docker build \
--pull \
--build-arg DOCKER_USERNAME=$DOCKER_USERNAME \
--build-arg ONEC_USERNAME=$ONEC_USERNAME \
--build-arg ONEC_PASSWORD=$ONEC_PASSWORD \
--build-arg ONEC_VERSION=$ONEC_VERSION \
-t $DOCKER_USERNAME/crs:$ONEC_VERSION \
-f crs/Dockerfile \
$last_arg
docker push $DOCKER_USERNAME/crs:$ONEC_VERSION
docker build \
--build-arg DOCKER_USERNAME=$DOCKER_USERNAME \
--build-arg ONEC_VERSION=$ONEC_VERSION \
-t $DOCKER_USERNAME/crs-apache:$ONEC_VERSION \
-f crs-apache/Dockerfile \
$last_arg
docker push $DOCKER_USERNAME/crs-apache:$ONEC_VERSION