-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
32 lines (21 loc) · 818 Bytes
/
build.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
#!/bin/bash
# you can rebuild your stack without cache
CACHE="--no-cache"
#CACHE=""
# CORE IMAGE LAYER
docker build ${CACHE} -t swayoleg/lamp-base:1.0 01_base
# LIBS IMAGE LAYER with images support
docker build ${CACHE} -t swayoleg/lamp-images:1.0 02_libs/01_images
# SERVICES IMAGE LAYER
docker build ${CACHE} -t swayoleg/lamp-redis:1.0 03_services/01_redis
#DATABASE
docker build ${CACHE} -t swayoleg/lamp-db:5.7 04_database/01_mysql/5.7
# PHP IMAGE LAYER
docker build ${CACHE} -t swayoleg/lamp-php:7.0 05_php/03_7.0
# SERVER image layer
docker build ${CACHE} -t swayoleg/lamp-apache:2.0 06_server/01_apache2
#utils like sendmail etc
docker build ${CACHE} -t swayoleg/lamp-utils:1.0 07_utils
# FINAL LAMP
docker build ${CACHE} -t swayoleg/lamp:1.0 ./
sh ./sh/rm-intermidiate.sh