mirror of
https://github.com/usatiuk/photos.git
synced 2025-10-28 23:37:48 +01:00
ok now it should cache
This commit is contained in:
@@ -92,7 +92,6 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
machine:
|
machine:
|
||||||
image: ubuntu-2004:current
|
image: ubuntu-2004:current
|
||||||
docker_layer_caching: true
|
|
||||||
working_directory: ~/photos
|
working_directory: ~/photos
|
||||||
resource_class: large
|
resource_class: large
|
||||||
|
|
||||||
@@ -108,12 +107,26 @@ jobs:
|
|||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: create docker builder
|
name: create docker builder
|
||||||
command: docker buildx create --use
|
command: docker buildx create --use --driver=docker-container
|
||||||
|
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- buildx-photos-circleci
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: build and push to docker hub
|
name: build and push to docker hub
|
||||||
command: docker buildx build --progress=plain --push --platform linux/arm64,linux/amd64 --tag stepanusatiuk/photos:$CIRCLE_BRANCH .
|
command: |
|
||||||
#command: docker buildx build --push --platform linux/amd64 --tag stepanusatiuk/photos:$CIRCLE_BRANCH .
|
docker buildx build --progress=plain --push --platform linux/arm64,linux/amd64 --tag stepanusatiuk/photos:$CIRCLE_BRANCH \
|
||||||
|
--cache-to=type=local,mode=max,dest=/tmp/dockercache \
|
||||||
|
--cache-from=type=local,src=/tmp/dockercache .
|
||||||
|
- run:
|
||||||
|
name: prune cache
|
||||||
|
command: docker buildx prune --keep-storage=2gb --verbose
|
||||||
|
|
||||||
|
- save_cache:
|
||||||
|
key: buildx-photos-circleci
|
||||||
|
paths:
|
||||||
|
- /tmp/dockercache
|
||||||
|
|
||||||
# build-arm:
|
# build-arm:
|
||||||
# machine:
|
# machine:
|
||||||
|
|||||||
Reference in New Issue
Block a user