ci: add gitlab ci for docker compose
- split into multiple jobs - specify tags for runner large - use buildx and add separate builder default has no cache - build image from cache and push to registry - compose use tag and pull - use cache tag for reuse - https://github.com/moby/buildkit/issues/1981 - https://github.com/moby/buildkit/issues/3730 - use cache-to and cache-from with registry/cache - add dockerignore to prevent rebuild on git changes - use individual builders - add step for docker compose up - update readme - update dockerignore - add gitignore - use script reduce duplicate code - cache from and to in build, compose use cache - dont push images just use cache - build in compose step from cache Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
This commit is contained in:
8
scripts/build_from_cache.sh
Executable file
8
scripts/build_from_cache.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
SERVICE=$1
|
||||
|
||||
cd $SERVICE
|
||||
docker build --load --builder $BUILDER --cache-from $CACHE/$SERVICE:$CACHE_TAG -t $SERVICE:$IMAGE_TAG .
|
||||
10
scripts/build_image_cache.sh
Executable file
10
scripts/build_image_cache.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
SERVICE=$1
|
||||
|
||||
docker buildx create --name=$SERVICE --use
|
||||
cd $SERVICE
|
||||
|
||||
docker build --load --builder=$SERVICE --cache-to type=registry,ref=$CACHE/$SERVICE:$CACHE_TAG --cache-from $CACHE/$SERVICE:$CACHE_TAG -t $SERVICE:$IMAGE_TAG .
|
||||
3
scripts/pre-commit
Executable file
3
scripts/pre-commit
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
cmp bitcoind/bitcoin.conf lightningd/bitcoin.conf
|
||||
Reference in New Issue
Block a user